Defect #5892

Changing status from contextual menu opens the ticket instead

Added by Cristiano Bianchi over 7 years ago. Updated over 7 years ago.

Status:ClosedStart date:2010-07-16
Priority:HighDue date:
Assignee:-% Done:

0%

Category:Issues
Target version:1.0.1
Resolution:Fixed Affected version:

Description

When in an Issue list and using the right-click contextual navigation and trying to change Status of an Issue, redmine opens the ticket instead of simply change the status and stay in the list. This was not happening in version 0.8.4, which we had before, but it does happen in 0.9.5

fix_contextmenu_status_change_behaviour-r3847.patch Magnifier - SVN-patch against Redmine trunk @ r3847. (883 Bytes) Mischa The Evil, 2010-07-18 02:45


Related issues

Related to Redmine - Patch #5894: Allow bulk status change Closed 2010-07-16
Related to Redmine - Patch #1650: Start/end time tracking for timelogging New 2008-07-15

Associated revisions

Revision 3871
Added by Jean-Philippe Lang over 7 years ago

Fixes broken status change in context menu (#5892).

History

#1 Updated by Mischa The Evil over 7 years ago

I can confirm this too on the current trunk @ r3847, thus 'devel' is the affected version at first.

I've extracted a workaround patch (based on patches from both issue #5894 and issue #1650 [note-21 and follow-up forum-thread ] ) for this issue.
Though, I believe it is not the best way to solve this issue. I now "abuse" the bulk_edit action-method to apply the status-transition instead of using the regular edit action-method.

IMHO this defect is pretty awful and should be fixed asap. That's why I've changed the "Priority" and "Target version" accordingly...
Please correct me if I'm wrong...

Patchfile: fix_contextmenu_status_change_behaviour-r3847.patch

#2 Updated by Jean-Philippe Lang over 7 years ago

  • Status changed from New to Closed
  • Resolution set to Fixed

Fixed in r3871.

#3 Updated by Cristiano Bianchi over 7 years ago

  • Status changed from Closed to Reopened

I was on r3826 and tried to update to 3871 or the current 3876.
In both cases, when using the contextual change of status I now get an error 500.

Should I have updated other things when upgrading from 3826?

Ruby version is 1.8.7
Gem version is 1.3.5
Rails version is 2.3.5
Passenger version is 2.2.15

Thanks, Cristiano

#4 Updated by Felix Schäfer over 7 years ago

Cristiano Bianchi wrote:

I was on r3826 and tried to update to 3871 or the current 3876.
In both cases, when using the contextual change of status I now get an error 500.

Should I have updated other things when upgrading from 3826?

Can't reproduce on current trunk (r3878), have you restarted your redmine after the update? Please also be aware that you need to be a member of the project as even admins can't break workflows.

#5 Updated by Cristiano Bianchi over 7 years ago

Yes Felix. I have restarted Redmine, several times. I run it with Passenger on Apache 2.2 so I have restarted Apache.
The only way to avoid the error is to go back to r3826.

What do you mean that I need to be a member of the project and I have "broken" a workflow...? If I remember correctly it was you who suggested to post a ticket here when I mentioned the issue on the forums.

Thanks, Cristiano

#6 Updated by Jean-Philippe Lang over 7 years ago

Cristiano Bianchi wrote:

I was on r3826 and tried to update to 3871 or the current 3876.
In both cases, when using the contextual change of status I now get an error 500.

Please attach your error stack trace.

#7 Updated by Felix Schäfer over 7 years ago

Cristiano Bianchi wrote:

What do you mean that I need to be a member of the project and I have "broken" a workflow...? If I remember correctly it was you who suggested to post a ticket here when I mentioned the issue on the forums.

To be able to change the status, you need to be allowed per the worklfow.

Anyway, I was able to reproduce by selecting more than one issue, here the relevant trace from the production log:

Processing IssuesController#context_menu (for 129.217.54.189 at 2010-07-25 12:51:32) [POST]
  Parameters: {"back_url"=>"/projects/sandbox/issues", "ids"=>["861", "847"], "action"=>"context_menu", "authenticity_token"=>"[EDITED]", "controller"=>"issues", "_"=>""}
Rendering issues/context_menu

ActionView::TemplateError (undefined method `leaf?' for nil:NilClass) on line #37 of app/views/issues/context_menu.rhtml:
34:             <ul>
35:             <% @priorities.each do |p| -%>
36:                 <li><%= context_menu_link p.name, {:controller => 'issues', :action => 'bulk_edit', :ids => @issues.collect(&:id), :issue => {'priority_id' => p}, :back_url => @back}, :method => :post,
37:                                           :selected => (@issue && p == @issue.priority), :disabled => (!@can[:edit] || !@issue.leaf?) %></li>
38:             <% end -%>
39:             </ul>
40:     </li>

    app/views/issues/context_menu.rhtml:37:in `_run_rhtml_app47views47issues47context_menu46rhtml'
    app/views/issues/context_menu.rhtml:35:in `each'
    app/views/issues/context_menu.rhtml:35:in `_run_rhtml_app47views47issues47context_menu46rhtml'
    app/controllers/issues_controller.rb:354:in `context_menu'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in `process_request'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/railz/application_spawner.rb:441:in `start_request_handler'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/railz/application_spawner.rb:381:in `handle_spawn_application'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/utils.rb:252:in `safe_fork'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/railz/application_spawner.rb:377:in `handle_spawn_application'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/railz/application_spawner.rb:222:in `start'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/railz/framework_spawner.rb:291:in `handle_spawn_application'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/railz/framework_spawner.rb:286:in `handle_spawn_application'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/railz/framework_spawner.rb:284:in `handle_spawn_application'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/railz/framework_spawner.rb:101:in `start'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/spawn_manager.rb:253:in `spawn_rails_application'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/spawn_manager.rb:247:in `spawn_rails_application'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/spawn_manager.rb:246:in `spawn_rails_application'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/spawn_manager.rb:145:in `spawn_application'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/spawn_manager.rb:278:in `handle_spawn_application'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
    /usr/lib64/ruby/site_ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
    /usr/lib/phusion_passenger/passenger-spawn-server:61

Rendering /var/www/orga.fachschaften.org/public/500.html (500 Internal Server Error)

#8 Updated by Felix Schäfer over 7 years ago

  • Status changed from Reopened to Closed

Closing this issue as the problem was not introduced in the fix for this issue, but in the fix for #5925.

#9 Updated by Cristiano Bianchi over 7 years ago

I'm not reopening this, but it still does not work for me.
I have updated to r3911, and rake upgraded the DB.
But when I use the contextual menu to change status, I get an error 500.

Any help would be appreciated.

Thanks, Cristiano

#10 Updated by Felix Schäfer over 7 years ago

Please open a thread in the help forum and provide the trace from your redmine log.

Also available in: Atom PDF