Bug 1031468

Summary: Project default Copy Trans options cannot be changed
Product: [Retired] Zanata Reporter: Carlos Munoz <camunoz>
Component: Component-CopyTrans, Component-PersistenceAssignee: Carlos Munoz <camunoz>
Status: CLOSED CURRENTRELEASE QA Contact: Ding-Yi Chen <dchen>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.1CC: dchen, zanata-bugs
Target Milestone: ---   
Target Release: 3.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 3.2-SNAPSHOT (20131120-0038) Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-18 06:48:25 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:

Description Carlos Munoz 2013-11-18 03:58:48 UTC
Description of problem:
A user is not able to modify the default project copy trans options because of a NonUniqueOjectException.

Version-Release number of selected component (if applicable):
3.1 (maybe earlier)

How reproducible:
Always

Steps to Reproduce:
1. Log in and head to a project where the user has maintainer privileges.
2. Click on Copy Trans Options.
3. Modify the options
4. Click save.

Actual results:
An error is shown on screen.

Expected results:
The options are saved and a nice info message is shown.

Comment 1 Carlos Munoz 2013-11-18 04:05:28 UTC
This was caused by caching some hibernate entities in the view-scope. Solved it by removing that caching, and letting second level cache deal with that.
We should consider making the merge method from session/entity manager visible in the DAOs as this would have been another possible solution.

See:
https://github.com/zanata/zanata-server/pull/278

Comment 2 Ding-Yi Chen 2013-11-20 00:34:22 UTC
VERIFIED with Zanata version 3.2-SNAPSHOT (20131120-0038)