History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CIB-1973
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: 2 2
Assignee: jason
Reporter: Rohan McGovern
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Pulse

Restoring hidden item breaks hidden item at the same path in a sibling template

Created: 17/May/09 10:05 PM   Updated: 30/May/09 09:10 AM
Component/s: None
Affects Version/s: 2.0.30
Fix Version/s: 2.1.4, 2.0.31

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Issue Links:
Related
 
This issue is related to:
CIB-1918 Hidden cron triggers with a property ... 3 Resolved


 Description  « Hide
I have a top-level template, which has three child templates, each of which has one child project.

Somehow, the system has got into a state where only two of the three child projects show on the dashboard. Even weirder, one of the projects always shows fine, the other two seem to "compete" for who gets to show.

The top-level template defines two build stages, Linux and Windows. The project which shows fine (A) has both build stages turned on. Projects B and C, which seem to compete, have the Windows build stage hidden at the second level template.

If I note that project B is showing on the dashboard, then navigate to its 'build stage' configuration, and click "restore" and then "hide" on the Windows build stage, the situation becomes reversed: project C is now showing on the dashboard and project B is not!

Furthermore, if I navigate to the "build stages" configuration for the third level project which is not showing on the dashboard, the page fails to render with "Failed to render form. Unexpected class java.lang.NullPointerException: null"

More detail is coming in a mail to support@ ...

 All   Comments   Work Log   Change History      Sort Order:
Daniel Ostermeier - 19/May/09 08:55 AM
To reproduce:

Create base template A.
Create child template B and C below A.
Create concrete children D and E below B and C respectively.
Create stage X and Y at A.
Hide stage X in B and C.
At this point, all is still as expected.

Now restore and hide stage X in B. Going back to the dashboard will show project E is hidden. Internally, the reason for this is that validation has decided that project E is incomplete, in particular, it has a build stage with a missing name field.

jason - 26/May/09 06:41 AM
The bug occurs at the time of restore. The restore at B incorrectly adds skeletons to the hierarchy underneath A, which includes C and E. I believe this is simply because the skeleton addition only works on strict descendents so the restore code mistakenly passes the parent of B to ensure B itself is included -- not allowing for the fact that B's siblings will then also be included. When the stage is not hidden in C this bug is harmless as the skeleton addition bails out on finding the stage already exists. But when it is not hidden the skeletons are added incorrectly, breaking C and E - so E is no longer shown in the reporting UI. The fix is to add skeletons from B down (non-strict, i.e. including B).

jason - 27/May/09 10:17 AM
Fixed in change 5928.

jason - 30/May/09 09:10 AM
Merged to trunk in change 5945.