Defect #35555
closedImport Issue failing with NoMethodError undefined method `spent_on'
0%
Description
When trying to Import issues, even when using the issues.csv file found in the "How To Import Issues" wiki HowTo_import_issues, it fails with 0/1 (in this case).
I have tried with a number of different CSV files, and always get the same results.
This is done from the "Import" menu item on the actions "..." on the "Items" tab.
This is the log when using issues.csv from the wiki (also attached) :
I, [2021-07-12T14:36:55.227105 #486340] INFO -- : Started POST "/imports/c3ec18bbebcd65c763e25b1da254f4da/mapping" for 127.0.0.1 at 2021-07-12 14:36:55 +1000
I, [2021-07-12T14:36:55.228232 #486340] INFO -- : Processing by ImportsController#mapping as HTML
I, [2021-07-12T14:36:55.228357 #486340] INFO -- : Parameters: {"utf8"=>"✓", "authenticity_token"=>"TOifAYGuGBBaTxQgbfNYsB_BYw_GnbaTIJXN0bopjIEcslAQGaY9KgQD09dUfNmtzSHbIlCI2jAuUUSTYaOGdA", "import_settings"=>{"mapping"=>{"project_id"=>"251", "tracker"=>"0", "status"=>"1", "subject"=>"3", "description"=>"", "priority"=>"2", "category"=>"6", "assigned_to"=>"5", "fixed_version"=>"7", "is_private"=>"12", "start_date"=>"8", "due_date"=>"9", "estimated_hours"=>"10", "done_ratio"=>"", "cf_41"=>"", "unique_id"=>"", "parent_issue_id"=>"", "relation_duplicates"=>"", "relation_duplicated"=>"", "relation_blocks"=>"", "relation_blocked"=>"", "relation_relates"=>"", "relation_precedes"=>"", "relation_follows"=>"", "relation_copied_to"=>"", "relation_copied_from"=>""}}, "commit"=>"Import", "id"=>"c3ec18bbebcd65c763e25b1da254f4da"}
I, [2021-07-12T14:36:55.247370 #486340] INFO -- : Current user: sparker (id=42)
I, [2021-07-12T14:36:55.265696 #486340] INFO -- : Redirected to http://127.0.0.1:9292/imports/c3ec18bbebcd65c763e25b1da254f4da/run
I, [2021-07-12T14:36:55.266009 #486340] INFO -- : Completed 302 Found in 38ms (ActiveRecord: 20.6ms)
I, [2021-07-12T14:36:55.276593 #486340] INFO -- : Started GET "/imports/c3ec18bbebcd65c763e25b1da254f4da/run" for 127.0.0.1 at 2021-07-12 14:36:55 +1000
I, [2021-07-12T14:36:55.278065 #486340] INFO -- : Processing by ImportsController#run as HTML
I, [2021-07-12T14:36:55.278211 #486340] INFO -- : Parameters: {"id"=>"c3ec18bbebcd65c763e25b1da254f4da"}
I, [2021-07-12T14:36:55.285621 #486340] INFO -- : Current user: sparker (id=42)
I, [2021-07-12T14:36:55.297859 #486340] INFO -- : Rendering imports/run.html.erb within layouts/base
I, [2021-07-12T14:36:55.305364 #486340] INFO -- : Rendered issues/_sidebar.html.erb (5.7ms)
I, [2021-07-12T14:36:55.305639 #486340] INFO -- : Rendered imports/_issues_sidebar.html.erb (6.5ms)
I, [2021-07-12T14:36:55.306148 #486340] INFO -- : Rendered imports/run.html.erb within layouts/base (8.1ms)
I, [2021-07-12T14:36:55.313883 #486340] INFO -- : Rendered plugins/redmine_wiki_extensions/app/views/wiki_extensions/_html_header.html.erb (0.5ms)
I, [2021-07-12T14:36:55.315878 #486340] INFO -- : Rendered plugins/redmine_wktime/app/views/wkbase/_base_header.html.erb (1.4ms)
I, [2021-07-12T14:36:55.316978 #486340] INFO -- : Rendered plugins/stopwatch/app/views/stopwatch/hooks/_layouts_base_html_head.html.erb (0.6ms)
I, [2021-07-12T14:36:55.318366 #486340] INFO -- : Rendered plugins/clipboard_image_paste/app/views/clipboard_image_paste/_headers.html.erb (0.9ms)
I, [2021-07-12T14:36:55.318711 #486340] INFO -- : Rendering plugins/wiki_graphviz_plugin/app/views/wiki_graphviz/_head.html.erb
I, [2021-07-12T14:36:55.319291 #486340] INFO -- : Rendered plugins/wiki_graphviz_plugin/app/views/wiki_graphviz/_head.html.erb (0.4ms)
I, [2021-07-12T14:36:55.465763 #486340] INFO -- : Rendered plugins/redmine_hourglass/app/views/hooks/_account_menu_link.slim (0.2ms)
I, [2021-07-12T14:36:55.469685 #486340] INFO -- : Rendered plugins/redmine_wktime/app/views/wktime/_attendance_widget.html.erb (3.7ms)
I, [2021-07-12T14:36:55.470028 #486340] INFO -- : Rendered plugins/sidebar_hide/app/views/sidebar/_hideButton_partial.html.erb (0.2ms)
I, [2021-07-12T14:36:55.470440 #486340] INFO -- : Rendered plugins/redmine_wiki_extensions/app/views/wiki_extensions/_body_bottom.html.erb (0.1ms)
I, [2021-07-12T14:36:55.471643 #486340] INFO -- : Rendered plugins/stopwatch/app/views/stopwatch/hooks/_layouts_base_body_bottom.html.erb (1.0ms)
I, [2021-07-12T14:36:55.473999 #486340] INFO -- : Rendered plugins/clipboard_image_paste/app/views/clipboard_image_paste/_add_form.html.erb (2.1ms)
I, [2021-07-12T14:36:55.474275 #486340] INFO -- : Completed 200 OK in 196ms (Views: 149.7ms | ActiveRecord: 33.7ms)
I, [2021-07-12T14:36:55.594192 #486340] INFO -- : Started POST "/imports/c3ec18bbebcd65c763e25b1da254f4da/run.js" for 127.0.0.1 at 2021-07-12 14:36:55 +1000
I, [2021-07-12T14:36:55.594923 #486340] INFO -- : Processing by ImportsController#run as JS
I, [2021-07-12T14:36:55.594991 #486340] INFO -- : Parameters: {"id"=>"c3ec18bbebcd65c763e25b1da254f4da"}
I, [2021-07-12T14:36:55.599460 #486340] INFO -- : Current user: sparker (id=42)
I, [2021-07-12T14:36:55.745410 #486340] INFO -- : Completed 500 Internal Server Error in 150ms (ActiveRecord: 31.3ms)
F, [2021-07-12T14:36:55.746061 #486340] FATAL -- :
F, [2021-07-12T14:36:55.746241 #486340] FATAL -- : NoMethodError (undefined method `spent_on' for #<Issue:0x00007f82239c1650>
Did you mean? spent_hours):
F, [2021-07-12T14:36:55.746290 #486340] FATAL -- :
F, [2021-07-12T14:36:55.746337 #486340] FATAL -- : plugins/redmine_wktime/app/helpers/wktime_helper.rb:1956:in `statusValidation'
plugins/redmine_wktime/init.rb:85:in `block in run'
app/models/import.rb:142:in `block in read_items'
app/models/import.rb:254:in `block in read_rows'
app/models/import.rb:253:in `read_rows'
app/models/import.rb:136:in `read_items'
plugins/redmine_wktime/init.rb:72:in `run'
app/controllers/imports_controller.rb:87:in `run'
lib/redmine/sudo_mode.rb:61:in `sudo_mode'
This is our setup:
Environment:
Redmine version 4.2.1.stable
Ruby version 2.6.7-p197 (2021-04-05) [x86_64-linux]
Rails version 5.2.5
Environment production
Database adapter Mysql2
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
SCM:
Subversion 1.14.1
Git 2.31.1
Filesystem
Redmine plugins:
clipboard_image_paste 1.13
gerrit_connector 0.1.0
redmine_base_deface 1.5.3
redmine_hourglass 1.1.2+develop
redmine_wiki_extensions 0.9.2
redmine_wktime 4.2.1
sidebar_hide 0.0.8
stopwatch 0.1.0
wiki_graphviz_plugin 0.8.0
Files