Bug 922584 - Error should be shown if project maintainer push a project without translation
Error should be shown if project maintainer push a project without translation
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-Maven (Show other bugs)
2.3
Unspecified Unspecified
unspecified Severity high
: ---
: 2.3
Assigned To: David Mason
Ding-Yi Chen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-17 21:43 EDT by Ding-Yi Chen
Modified: 2013-11-26 22:36 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-26 22:23:40 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Ding-Yi Chen 2013-03-17 21:43:08 EDT
Description of problem:
Project maintainer might accidently wipe out the project if source files are absent, which is quite common for offlinepo project type or po file zip download.

Version-Release number of selected component (if applicable):
Zanata version 2.3-SNAPSHOT (20130314-1234)

How reproducible:
Always

Steps to Reproduce:
1. Download po file zip from any project version
2. Push as the project maintainer with maven client:
   mvn zanata:push

  
Actual results:
The project source documents are deemed as obsolete.
It acts as if the project version is wiped out.

Expected results:
Without explicit declear either pushType=both or zanata.pushType=src,
push should stop and print error message: "No source documents exist".

If either pushType=both or zanata.pushType=src is explicit specified, 
then show warning instead and ask for confirmation. (This is current behavior)
 

Additional info:
Comment 1 David Mason 2013-03-24 23:13:47 EDT
Updated cli client and maven plugin so that source is never used for project type 'offlinepo'.

 - If user tries to push or pull with type "source", an error is shown and the command is aborted.
 - If user tries to push or pull with type "both", a warning is shown indicating that source will be ignored, and the command continues as though type is "trans".

See: https://github.com/zanata/zanata-client/compare/1dcd0fcadb920bd3f7d0d9ee8a1e13a77d4244fc...11bbf8718af812c10af7dc65d65d5e04234e4be8
Comment 2 David Mason 2013-03-24 23:21:14 EDT
The initial description appears to suggest that a confirmation message is not shown for pushType=src, but this could not be reproduced - a confirmation message is always shown immediately after messages stating that obsolete files will be deleted. The only time this should not happen is when interactive mode is disabled (it is enabled by default).

e.g. 

[INFO] No source documents found.
[WARNING] Found 2 obsolete docs on the server which will be DELETED
[INFO] Obsolete docs: [doc1.txt, doc2.txt]
This will overwrite existing source documents on the server, and delete obsolete documents.

Are you sure (y/n)? n
Comment 3 Alex Eng 2013-04-08 18:58:40 EDT
Verified on zanata-maven-plugin 2.2.1-SNAPSHOT
Comment 4 Sean Flanigan 2013-11-26 22:13:47 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 5 Sean Flanigan 2013-11-26 22:15:42 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 6 Sean Flanigan 2013-11-26 22:19:18 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 7 Sean Flanigan 2013-11-26 22:23:40 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 8 Sean Flanigan 2013-11-26 22:34:01 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.
Comment 9 Sean Flanigan 2013-11-26 22:36:13 EST
Closing VERIFIED bugs for Zanata versions <= 3.1.

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