Defect #10181

Issue context menu and bulk edit form show irrelevant statuses

Added by Victor Dulepov almost 6 years ago. Updated almost 6 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Issues workflow
Target version:1.4.0
Resolution:Fixed Affected version:1.0.3

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?

irrelevant_issue_statuses_from_parent_project.png (32.4 KB) Victor Dulepov, 2012-02-09 08:53


Related issues

Duplicated by Redmine - Defect #10354: Unused (disabled) statuses for the certain workflow still... Closed
Duplicated by Redmine - Defect #6510: Context Menu shows statuses the Tracker doesn't use Closed 2010-09-27

Associated revisions

Revision 8825
Added by Jean-Philippe Lang almost 6 years ago

Only show allowed statuses in context menu (#10181).

Revision 8844
Added by Jean-Philippe Lang almost 6 years ago

Only show statuses that can be applied to all issues on the bulk edit form (#10181).

History

#1 Updated by Victor Dulepov almost 6 years ago

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| -%>

#2 Updated by Victor Dulepov almost 6 years ago

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

#3 Updated by Victor Dulepov almost 6 years ago

PS - sorry for necroposting for an ancient version.

#4 Updated by Jean-Philippe Lang almost 6 years ago

  • 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

Fixed for 1.4.0.

#5 Updated by Go MAEDA 10 months ago

  • Duplicated by Defect #6510: Context Menu shows statuses the Tracker doesn't use added

Also available in: Atom PDF