Bug 829515 - Uploading document which contains a slash ('/') at the beginning of its path may cause lost translations.
Summary: Uploading document which contains a slash ('/') at the beginning of its path ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Component-Logic, Component-UI
Version: 1.6-SNAPSHOT
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 1.6.1
Assignee: Carlos Munoz
QA Contact: Ding-Yi Chen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-07 00:18 UTC by Carlos Munoz
Modified: 2012-07-03 05:27 UTC (History)
1 user (show)

Fixed In Version: 1.6.1-SNAPSHOT (20120608-0019)
Doc Type: Bug Fix
Doc Text:
Cause Uploading a document via the UI containing a leading slash ('/') on the path. Uploading the same document using the maven client. Consequence Zanata will take the document uploaded using the maven client as a different one and will overwrite the previous one, but the translations will be attached to the previous one. Workaround Don't use paths with leading slashes ('/') when uploading documents via the UI.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-03 05:27:51 UTC
Embargoed:


Attachments (Terms of Use)

Description Carlos Munoz 2012-06-07 00:18:47 UTC
Description of problem:
Uploading a document via the UI, and specifying a path with a leading slash ('/') will cause translations units to be lost if the same document is uploaded subsequently using the maven client.

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

How reproducible:
Every time.


Steps to Reproduce:
1. Upload a document to a project using the UI. Make sure the document's path contains a leading slash ('/').
2. Try pushing the same document using the maven client. Make sure the document sits on the same path as the one it was uploaded from the UI.
  
Actual results:
The maven client will make the document pushed from the UI obsolete, while creating a new one. However, the translation units (text flows) will be attached to the first one causing the new document to be empty.


Expected results:
The maven client should accept the original document as the same one and attach translations to it.

Additional info:
The simplest workaround is to make sure that when uploading documents from the UI, the entered path does not contain leading slashes ('/').

Comment 1 Carlos Munoz 2012-06-07 00:24:51 UTC
Preventing leading slahes when uploading via the UI.

See:
https://github.com/zanata/zanata/commit/a7937c6cce66b6345974a9ee0d1cd49b9c8c670c

Comment 2 Carlos Munoz 2012-06-07 00:24:52 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause
Uploading a document via the UI containing a leading slash ('/') on the path. Uploading the same document using the maven client.

Consequence
Zanata will take the document uploaded using the maven client as a different one and will overwrite the previous one, but the translations will be attached to the previous one.

Workaround
Don't use paths with leading slashes ('/') when uploading documents via the UI.

Comment 3 Ding-Yi Chen 2012-06-07 04:48:41 UTC
I works when upload with Web UI first and maven push later.

However, other way does not work. (i.e maven push first but upload later.

thus REASSIGNED.

Comment 4 Ding-Yi Chen 2012-06-08 00:34:15 UTC
VERIFIED with Zanata version 1.6.1-SNAPSHOT (20120608-0019)


Note You need to log in before you can comment on or make changes to this bug.