Defect #10181
closed
Issue context menu and bulk edit form show irrelevant statuses
Added by Victor Dulepov almost 13 years ago.
Updated almost 13 years ago.
Description
redmine 1.0.3.
A parent project is setup with several custom trackers with custom workflows. It's child project uses a completely individual tracker with its own workflow (not overlapping with any of its parent's).
When I right-click an issue in the issue list of the child project and select Status, it shows me all statuses from the parent project (as disabled) along with the ones for the current tracker/project. Much unneeded staff to scroll through.
Similar on the bulk edit screen: all statuses from parent project are listed as available, although the current project only has one tracker and one workflow with none of those statuses relevant.
Is it the same in the latest release? Any way to filter them more strictly?
Files
Ok, for the issues list context menu it's at line 16 of /views/context_menus/issues.html.erb
Replaced
<% @statuses.each do |s| -%>
with
<% @allowed_statuses.each do |s| -%>
For bulk edit (when you edit issues belonging to different trackers) the page is still somewhat misleading (not all field changes will apply to all issues); however, you can restrict the list of statuses to only really allowed values by replacing line 195 of app/controllers/issues_controller.rb
@available_statuses = Workflow.available_statuses(@project)
with an equivalent of what is done inside app/controllers/context_menus_controller.rb :
if (@issues.size == 1)
@issue = @issues.first
@available_statuses = @issue.new_statuses_allowed_to(User.current)
else
@available_statuses = @issues.map do |i|
i.new_statuses_allowed_to(User.current)
end.inject do |memo,s|
memo & s
end
end
PS - sorry for necroposting for an ancient version.
- Subject changed from Issue list and Bulk Edit: irrelevant Statuses from a parent project available to Issue context menu and bulk edit form show irrelevant statuses
- Status changed from New to Closed
- Assignee set to Jean-Philippe Lang
- Target version set to 1.4.0
- Resolution set to Fixed
- Has duplicate Defect #6510: Context Menu shows statuses the Tracker doesn't use added
Also available in: Atom
PDF