プロジェクト

全般

プロフィール

Vote #71334

完了

Issue context menu and bulk edit form show irrelevant statuses

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Issues workflow_41
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
41
version_id:
40
issue_org_id:
10181
author_id:
6894
assigned_to_id:
1
comments:
5
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
25
ステータス-->[Closed]

説明

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!


journals

Ok, for the issues list context menu it's at line 16 of _/views/context_menus/issues.html.erb_

Replaced
<pre>
<% @statuses.each do |s| -%>

</pre>
with
<pre>
<% @allowed_statuses.each do |s| -%>

</pre>
--------------------------------------------------------------------------------
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_

<pre>
@available_statuses = Workflow.available_statuses(@project)
</pre>

with an equivalent of what is done inside _app/controllers/context_menus_controller.rb_ :

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

</pre>

--------------------------------------------------------------------------------
PS - sorry for necroposting for an ancient version.
--------------------------------------------------------------------------------
Fixed for 1.4.0.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

duplicates,Closed,10354,Unused (disabled) statuses for the certain workflow still available in a context menu Status list when we click right mouse button on the issue within an issues list.
duplicates,Closed,6510,Context Menu shows statuses the Tracker doesn't use

Admin Redmine さんが約4年前に更新

  • カテゴリIssues workflow_41 にセット
  • 対象バージョン1.4.0_40 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0