Bug 922584 - Error should be shown if project maintainer push a project without translation
Summary: Error should be shown if project maintainer push a project without translation
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Component-Maven
Version: 2.3
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 2.3
Assignee: David Mason
QA Contact: Ding-Yi Chen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-18 01:43 UTC by Ding-Yi Chen
Modified: 2013-11-27 03:36 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-27 03:23:40 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 870876 0 medium CLOSED PO download for non-PO projects cannot be uploaded 2021-02-22 00:41:40 UTC

Internal Links: 870876

Description Ding-Yi Chen 2013-03-18 01:43:08 UTC
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-25 03:13:47 UTC
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-25 03:21:14 UTC
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 22:58:40 UTC
Verified on zanata-maven-plugin 2.2.1-SNAPSHOT

Comment 4 Sean Flanigan 2013-11-27 03:13:47 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 5 Sean Flanigan 2013-11-27 03:15:42 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 6 Sean Flanigan 2013-11-27 03:19:18 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 7 Sean Flanigan 2013-11-27 03:23:40 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 8 Sean Flanigan 2013-11-27 03:34:01 UTC
Closing VERIFIED bugs for Zanata versions <= 3.1.

Comment 9 Sean Flanigan 2013-11-27 03:36:13 UTC
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.