Defect #6510

Context Menu shows statuses the Tracker doesn't use

Added by Moritz Voss about 7 years ago. Updated 10 months ago.

Status:ClosedStart date:2010-09-27
Priority:NormalDue date:
Assignee:-% Done:

80%

Category:IssuesEstimated time:0.25 hour
Target version:-
Resolution:Duplicate Affected version:

Description

The context menu (item "Status>") should only list statuses that the tracker actually uses.

context.patch Magnifier (743 Bytes) Moritz Voss, 2010-09-28 00:22


Related issues

Duplicates Redmine - Defect #10181: Issue context menu and bulk edit form show irrelevant sta... Closed

History

#1 Updated by Moritz Voss about 7 years ago

The fix for this is very small (I think), I will dig it up from my home Redmine install. I am too insecure about Rails development, though, so I am reluctant to submit this as an actual patch without someone proofreading it.

#2 Updated by Vitaliy Sotikov about 7 years ago

  • % Done changed from 0 to 70

#3 Updated by Moritz Voss about 7 years ago

Very simple patch to reject invalid statuses while the context menu is built.

*** issues.html.erb.html    Mon Sep 27 22:33:00 2010
--- issues.html.erb.html    Tue Sep 28 00:18:43 2010
***************
*** 14,21 ****
--- 14,23 ----
          <a href="#" class="submenu" onclick="return false;"><%= l(:field_status) %></a>
          <ul>
          <% @statuses.each do |s| -%>
+             <% if ((s == @issue.status) || (@allowed_statuses.include?(s))) -%>                    
              <li><%= context_menu_link s.name, {:controller => 'issues', :action => 'bulk_edit', :ids => @issues.collect(&:id), :issue => {:status_id => s}, :back_url => @back}, :method => :post,
                                        :selected => (@issue && s == @issue.status), :disabled => !(@can[:update] && @allowed_statuses.include?(s)) %></li>
+             <% end %>
          <% end -%>
          </ul>
      </li>

#4 Updated by Jean-Baptiste Barth about 7 years ago

Actually statuses that are not allowed are displayed but you cannot select them. Why do you want to completely hide them ? Do you have an explicit example ?

#5 Updated by Moritz Voss about 7 years ago

It can be confusing for users when you have multiple workflows with numerous custom issue statuses, to see statuses that issues in the current tracker could never have. Having to skip over statuses when changing them can be tedious - we have a tracker with very "small" issues, that require being edited in Bulk, and advanced from one status to the next. Having to skip over a large block of unselectable statuses to "done" or "closed", which needs to be at the bottom of the list to be intuitive, seems to defeat the slick elegance of the context menu.

The unused statuses also take up screen real-estate in this very small menu. The menu gets very large when all the unused statuses are always listed; it often touches or overlaps the screen or window borders.

Last, but not least, the "Status" field in "Edit Issue" itself does only list valid statuses for each issue - so it's a question of consistency, too. Same goes for the workflow definition pane in the administration menu - filtering there is even on by default.

#6 Updated by Moritz Voss about 7 years ago

Addendum:

Jean-Baptiste Barth wrote:

Actually statuses that are not allowed are displayed but you cannot select them. Why do you want to completely hide them ? Do you have an explicit example ?

Why would you want to show them? Do you have an explicit example ?

(sorry for the retort, but when is it sensible to actually show a status that an issue can never, ever obtain?)

#7 Updated by Jean-Baptiste Barth about 7 years ago

Maybe I misunderstood the problem you pointed out : I though you were talking about statuses the user cannot apply because of a workflow limitation. If we hide statuses unreachable by the current user, we should also change all other fields display in context menu, it's a more general problem. Your proposed patch hide some statuses an issue can have, but that the current user cannot set himself.

If you confirm we should only hide statuses that nobody can reach, then OK, I 100% agree and I'll take a look at it.

#8 Updated by Moritz Voss about 7 years ago

Yes, I mean only statuses that the tracker never uses, and grey out statuses the user can't set it to.

In my case, it didn't occur to me that my patch took all the disallowed issues out - the one for 0.9.x didn't so maybe I screwed something up. I will look into it a little, too.

#9 Updated by Go MAEDA 10 months ago

  • Duplicates Defect #10181: Issue context menu and bulk edit form show irrelevant statuses added

#10 Updated by Go MAEDA 10 months ago

  • Category set to Issues
  • Status changed from New to Closed
  • Resolution set to Duplicate

Fixed by #10181 (Redmine 1.4.0).

Also available in: Atom PDF