Bug 1013961 - Duplicate buttons and links appear when version's project-type is not specified
Duplicate buttons and links appear when version's project-type is not specified
Product: Zanata
Classification: Community
Component: ProjectType-Code (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Damian Jansen
Zanata-QA Mailling List
Depends On:
  Show dependency treegraph
Reported: 2013-10-01 03:20 EDT by Ding-Yi Chen
Modified: 2014-07-28 20:25 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-07-28 20:25:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Inactive web elements (circled in Red) (33.28 KB, image/png)
2013-10-01 03:20 EDT, Ding-Yi Chen
no flags Details

  None (edit)
Description Ding-Yi Chen 2013-10-01 03:20:50 EDT
Created attachment 805752 [details]
Inactive web elements (circled in Red)

Description of problem:
Inactivate web elements appears when version project type is not specified.

New project version is less likely to have this problem, as the parent project-type is set as default.

However, existing project-version might suffer this.
Luckily, there is an easy workaround:

  1. Click "Edit Version"
  2. Explicitly select the correct project type
  3. Click "Update", the inactive web elements should be disappeared.

Version-Release number of selected component (if applicable):
Zanata version 3.0.4-SNAPSHOT (20131001-0022)
Zanata version 3.1-SNAPSHOT (20131001-1235)

How reproducible:

Steps to Reproduce:
1. Create a project with project type "gettext"
2. Create a version with project type "No selection".
3. Click any document list icon of any locale.

Actual results:
Two inactive actions: Offline Translation Config File" and "Download All Files (zip)" are shown.

Expected results:
Before step 2, No selection should not be selectable.
After step 3, No inactive actions should be shown.

Additional info:
If you push translation, it might even have inactive po download link. See attachment for screenshot.
Comment 1 Sean Flanigan 2013-10-02 19:52:27 EDT
I understand this is triggered by having a project version whose projectType is null, but the project's projectType is non-null.

If so, I think we could handle this by adding a new rule:
  for any project which has a type, its versions must have a non-null type.

This rule would then require that the project version page prevent saving unless the project type is non-null.

This would also require a data migration to ensure that any such project versions are updated to copy the project's projectType.

Together, these changes should both clean up the data (slightly) and prevent this GUI issue.
Comment 2 Sean Flanigan 2013-12-05 18:54:22 EST
I'm not sure we should hide the "Download All Files (zip)" button just because the project type is unset.  The fact that we get two buttons labeled "Offline Translation Config File" is a bug though.

If we do decide to hide "Download All Files (zip)", I think we should replace it with a big red warning which will encourage project maintainers to set the project type.  If we simply hide it, users might think the feature doesn't exist.
Comment 3 Damian Jansen 2014-07-28 20:25:41 EDT
Tested 3.5.0-SNAPSHOT (git-server-3.4.2-201-ge0afdde)
Seems to be fixed by the new UI

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