"with subproject" malfunction
|Assignee:||Eric Davis||% Done:|
|Target version:||1.0.0 (RC)|
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.
#1 Updated by Felix Schäfer over 9 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.
#3 Updated by Felix Schäfer over 9 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.
#7 Updated by Felix Schäfer over 9 years ago
- File include_subproject_event_types_in_activity_fetcher.patch added
- Status changed from New to 7
- Assignee changed from Felix Schäfer to Eric Davis
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).