Defect #5589

"with subproject" malfunction

Added by Orgad Shaneh over 7 years ago. Updated over 7 years ago.

Status:ClosedStart date:2010-05-25
Priority:NormalDue date:
Assignee:Eric Davis% Done:

100%

Category:-
Target version:1.0.0 (RC)
Resolution:Fixed Affected version:

Description

Hello,

When subprojects exist, Roadmap and Activity contain a checkbox "Subprojects" indicating whether to include subprojects in the report or not (see here for example).

If this checkbox is unchecked (default is checked), and then checked again, it doesn't show issues related to subprojects.

Digging a bit in the html code, it appears that two inputs with the same name (with_subprojects) exist. The first one is hidden with a constant value of 0, and the second one is the checkbox. This leads to a querystring that contains "with_subprojects=0&with_subprojects=1", which in turn does NOT include subprojects.

include_subproject_event_types_in_activity_fetcher.patch Magnifier - Adds the event types available in the project's subprojects (643 Bytes) Felix Schäfer, 2010-07-01 16:19

Associated revisions

Revision 3829
Added by Eric Davis over 7 years ago

Include visible subprojects when checking for available Activity event types. #5589

Contributed by Felix Schäfer

History

#1 Updated by Felix Schäfer over 7 years ago

I was able to reproduce, though the error is somewhere else, the second hidden checkbox for with_suprojects is only there to make sure the parameter has a 0 value instead of none if the checkbox is unchecked.

Anyway, the problem is that when you submit your request using the form in the sidebar, you only have the option to show activities that are enabled in the parent project, but you can't select those that are enable in child projects but not in the parent project. Example: parent project without repository, child project with a repository, when you go on activity, the checkins are there, but as soon as you click "apply", they won't appear anymore because you can't select "checkins" from the list.

#2 Updated by Orgad Shaneh over 7 years ago

The hidden input should be there only if there is NO checkbox at all (i.e. no active subprojects).
If there is a checkbox, and it is unchecked, it assigns the value 0 to with_subprojects, and the hidden input is unneeded.

#3 Updated by Felix Schäfer over 7 years ago

Orgad Shaneh wrote:

The hidden input should be there only if there is NO checkbox at all (i.e. no active subprojects).
If there is a checkbox, and it is unchecked, it assigns the value 0 to with_subprojects, and the hidden input is unneeded.

That's irrelevant to your problem.

#4 Updated by Felix Schäfer over 7 years ago

  • Assignee set to Felix Schäfer
  • Target version set to 1.0.0 (RC)

I'll try to tackle this for 1.0.0.

#5 Updated by Eric Davis over 7 years ago

Felix, are you going to have a patch ready in the next week for this? If not, we'll have to push it to the next release.

#6 Updated by Felix Schäfer over 7 years ago

Eric Davis wrote:

Felix, are you going to have a patch ready in the next week for this?

I just got my Laptop back from Apple yesterday, but I should be able to get it done tomorrow.

#7 Updated by Felix Schäfer over 7 years ago

Eric: here's the patch, I haven't found any tests for the activity fetcher though, but it worked on my test installation. The added overhead should be minimal (unless there's a very large number of subprojects none of which the user has rights to see a certain module for).

#8 Updated by Eric Davis over 7 years ago

  • Status changed from 7 to Closed
  • % Done changed from 0 to 100
  • Resolution set to Fixed

Thank you for the patch, I've included it in r3829.

We should take some time after the release to add some tests for the lib/redmine code, it's lacking a lot of coverage.

Also available in: Atom PDF