Project

General

Profile

Actions

Defect #5589

closed

"with subproject" malfunction

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
2010-05-25
Due date:
% Done:

100%

Estimated time:
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.


Files

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

Updated by Felix Schäfer over 14 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.

Actions #2

Updated by Orgad Shaneh over 14 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.

Actions #3

Updated by Felix Schäfer over 14 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.

Actions #4

Updated by Felix Schäfer over 14 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.

Actions #5

Updated by Eric Davis over 14 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.

Actions #6

Updated by Felix Schäfer over 14 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.

Actions #7

Updated by Felix Schäfer over 14 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).

Actions #8

Updated by Eric Davis over 14 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.

Actions

Also available in: Atom PDF