redmine_better_gantt_chart icon indicating copy to clipboard operation
redmine_better_gantt_chart copied to clipboard

redmine 1.2.1 raises NoMethodError in IssuesController#update undefined method `>' for nil:NilClass

Open rsilvestri opened this issue 13 years ago • 6 comments

I got some patches applied on 1.2.1 to allow subtasks in other subprojects, wiki extension plugin, wiki external filter plugin and wiki to overview plugin. So far everything works fine without better_gantt_chart.

Having applied better_gantt_chart I face problems when trying to assign an existing issue (1) to a freshly created parent issue (2). The problem disappears once I create a new child by creating a subtask (3) in (2). I even can delete (3) again and easily (1) can become a child of (2).

The application trace pointed me then to better_gantt_chart:

C:/trac/redmine/vendor/plugins/redmine_better_gantt_chart/lib/redmine_better_gantt_chart/issue_dependency_patch.rb:33:in reschedule_dependent_issue' C:1:ineach' C:1:in __send__' C:1:ineach' C:/trac/redmine/app/models/issue.rb:835:in recalculate_attributes_for' C:/trac/redmine/app/models/issue.rb:799:inupdate_parent_attributes' C:/trac/redmine/app/models/issue.rb:633:in save_issue_with_child_records' C:/trac/redmine/app/models/issue.rb:617:insave_issue_with_child_records' C:/trac/redmine/app/controllers/issues_controller.rb:179:in `update'

Once I delete better_gantt_chart from /vendor/plugins everything works fine again.

rsilvestri avatar Aug 17 '11 22:08 rsilvestri

Hi! Few questions here:

  1. Did you try it with clean Redmine 1.2.1 (without other patches)? The patch that allows subtasks in other projects might be the cause. Could you send me a link to this patch?
  2. Make sure you are using the plugin installed from this git repo, and not from Redmine site. The version of the plugin on Redmine site is a bit obsolete and doesn't include some latest fixes.
  3. What are the start and end dates, and durations of the issues you are creating? Are ther any empty/zero values?

kulesa avatar Aug 18 '11 11:08 kulesa

Hi Alexey,

Have a rather busy time and will be in holiday the coming week. Will give you feedback to your queries begining September.

Anyway, thanks very much for quick reaction and support.

Regards, Ruedi.

-----Original Message----- From: kulesa [mailto:[email protected] ithub.com] Sent: Donnerstag, 18. August 2011 13:12 To: Silvestri, Ruedi Subject: Re: [redmine_better_gantt_chart] redmine 1.2.1 raises NoMethodError in IssuesController#update undefined method `>' for nil:NilClass (#35)

Hi! Few questions here:

  1. Did you try it with clean Redmine 1.2.1 (without other patches)? The patch that allows subtasks in other projects might be the cause. Could you send me a link to this patch?
  2. Make sure you are using the plugin installed from this git repo, and not from Redmine site. The version of the plugin on Redmine site is a bit obsolete and doesn't include some latest fixes.
  3. What are the start and end dates, and durations of the issues you are creating? Are ther any empty/zero values?

Reply to this email directly or view it on GitHub: https://github.com/kulesa/redmine_better_gantt_chart/issues/35#issuecomm ent-1838146

rsilvestri avatar Aug 20 '11 12:08 rsilvestri

I appear to be getting a similar issue. I have 1.2.1 stable installed with no patches, several plugins, including Better Gantt Chart. Sometimes, when I have a task with a "Follows" and try to change the due date of the "precedes" task, I get the internal error below - I've seen it several times. If I unlink the tasks, the update works fine. I just tried a series of updates to try to recreate the problem but unfortunately cannot have not determined the condition that triggers it, so this is not that much help. I was hoping that another data point might help in pinpointing a cause.

Processing IssuesController#update (for 192.168.168.95 at 2011-08-31 14:50:33) [PUT] Parameters: {"time_entry"=>{"comments"=>"", "activity_id"=>"", "hours"=>""}, "commit"=>"Submit", "notes"=>"", "action"=>"update", "_method"=>"put", "authenticity_token"=>"uZlFovGWaoIaeLF0324VjEPo1awkGkcL1llOJkmz0CQ=", "id"=>"6", "issue"=>{"start_date"=>"2011-08-09", "custom_field_values"=>{"1"=>"", "2"=>""}, "estimated_hours"=>"80", "parent_issue_id"=>"4", "priority_id"=>"4", "is_private"=>"0", "lock_version"=>"12", "fixed_version_id"=>"1", "done_ratio"=>"80", "assigned_to_id"=>"8", "subject"=>"Implement Screen", "category_id"=>"", "tracker_id"=>"7", "due_date"=>"2011-09-09", "status_id"=>"2", "description"=>"Implement the main screen."}, "controller"=>"issues", "attachments"=>{"1"=>{"description"=>""}}}

NoMethodError (undefined method +' for nil:NilClass): app/models/issue.rb:606:insave_issue_with_child_records' app/models/issue.rb:588:in save_issue_with_child_records' app/controllers/issues_controller.rb:175:inupdate' config/initializers/mongrel.rb:62:in `dispatch_cgi'

swcurran avatar Aug 31 '11 22:08 swcurran

I'm seeing similar, it appears to be on issues that existed before installing better_gantt, but cannot be positive

derekjwilliams avatar Dec 13 '11 18:12 derekjwilliams

Log output, should have included in previous comment:

Processing IssuesController#update (for [removed] at 2011-12-13 11:31:29) [PUT]
  Parameters: {"time_entry"=>{"comments"=>"", "activity_id"=>"", "hours"=>""}, "
commit"=>"Submit", "notes"=>"", "action"=>"update", "_method"=>"put", "authentic
ity_token"=>"[removed]", "id"=>"299", "issue"
=>{"start_date"=>"", "custom_field_values"=>{"1"=>"3", "2"=>"3"}, "estimated_hou
rs"=>"0", "parent_issue_id"=>"298", "priority_id"=>"4", "is_private"=>"0", "lock
_version"=>"6", "fixed_version_id"=>"15", "done_ratio"=>"0", "assigned_to_id"=>"
1", "subject"=>"Appliance Update - Web Interface - Windows Supervisor", "tracker
_id"=>"8", "due_date"=>"", "status_id"=>"2", "description"=>"[removed, contained a URL]"}, "controller"=>"issues", "attachments"=>{"1"=
>{"description"=>""}}}

NoMethodError (undefined method `>' for nil:NilClass):
  app/models/issue.rb:831:in `recalculate_attributes_for'
  app/models/issue.rb:795:in `update_parent_attributes'
  app/models/issue.rb:831:in `recalculate_attributes_for'
  app/models/issue.rb:795:in `update_parent_attributes'
  app/models/issue.rb:629:in `save_issue_with_child_records'
  app/models/issue.rb:613:in `save_issue_with_child_records'
  app/controllers/issues_controller.rb:180:in `update'
  config/initializers/mongrel_cluster_with_rails_211_fix.rb:62:in `dispatch_cgi

derekjwilliams avatar Dec 13 '11 18:12 derekjwilliams

Any update on this>

cerw avatar Aug 31 '12 03:08 cerw