Bug 1101803

Summary: TMX clear function doesn't work from UI
Product: [Retired] Zanata Reporter: Patrick Huang <pahuang>
Component: Component-UIAssignee: Patrick Huang <pahuang>
Status: CLOSED CURRENTRELEASE QA Contact: Ding-Yi Chen <dchen>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.3CC: dchen, zanata-bugs
Target Milestone: ---   
Target Release: 3.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 3.5.0-SNAPSHOT (git-server-3.4.1-35-g04ca676) Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-26 23:28:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
sample TMX file none

Description Patrick Huang 2014-05-28 00:28:54 UTC
Description of problem:
After importing a TMX file, click on the clear button will not have any effect.

Version-Release number of selected component (if applicable):
3.4

How reproducible:
Always

Steps to Reproduce:
1. Log in as admin and go to Translation Memory under administration
2. Create a new TM 
3. Import a tmx file (attached is a simple one) and verify the number of entries column changed from 0 to 1.
4. Click button clear on that row
5. Click Ok in the confirmation popup

Actual results:
Number of entries stays 1

Expected results:
Number of entries become 0 and delete button is enabled

Additional info:
Server log:
0:22:38,606 ERROR [org.zanata.async.AsynchronousTaskExecutor] (DefaultQuartzScheduler_Worker-8) Exception when executing an asynchronous task.: java.lang.NullPointerException
	at org.zanata.action.TranslationMemoryAction$1.call(TranslationMemoryAction.java:119) [classes:]
	at org.zanata.action.TranslationMemoryAction$1.call(TranslationMemoryAction.java:112) [classes:]
	at org.zanata.async.AsynchronousTaskExecutor$1.execute(AsynchronousTaskExecutor.java:76) [classes:]
	at org.jboss.seam.security.Identity.runAs(Identity.java:743) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.jboss.seam.security.RunAsOperation.run(RunAsOperation.java:75) [jboss-seam-2.3.1.Final.jar:2.3.1.Final]
	at org.zanata.async.AsynchronousTaskExecutor.runAsynchronously(AsynchronousTaskExecutor.java:96) [classes:]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_30]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_30]

Comment 1 Patrick Huang 2014-05-28 00:29:54 UTC
Created attachment 899805 [details]
sample TMX file

Comment 2 Patrick Huang 2014-05-28 01:17:01 UTC
Current release 3.4.1 doesn't have this bug. It's only in master

Comment 3 Patrick Huang 2014-05-30 00:37:49 UTC
https://github.com/zanata/zanata-server/pull/466

Comment 4 Ding-Yi Chen 2014-05-30 01:09:01 UTC
VERIFIED with Zanata 3.5.0-SNAPSHOT (git-server-3.4.1-35-g04ca676)