Skip to content

Conversation

mayasd
Copy link

@mayasd mayasd commented Sep 11, 2025

Since we upgraded to Redmine 6 we got an error when displaying recurring issue (root issue only)

[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] ActionView::Template::Error (wrong number of arguments (given 1, expected 0)):
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] 
Causes:
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] ArgumentError (wrong number of arguments (given 1, expected 0))
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c]     15: 
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c]     16:   <% RedmineRecurringTasks::IssuePresenter.new(@issue).tap do |issue| %>
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c]     17:     <p><strong><%= l(:schedule) %></strong></p>
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c]     18:     <%= issue.schedule %>
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c]     19:     <%= issue.schedule_template %>
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c]     20:   <% end %>
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c]     21: </div>
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c]   
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] plugins/redmine_recurring_tasks/lib/redmine_recurring_tasks/issue_presenter.rb:16:in `to_s'
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] plugins/redmine_recurring_tasks/lib/redmine_recurring_tasks/issue_presenter.rb:16:in `block in schedule'
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] plugins/redmine_recurring_tasks/lib/redmine_recurring_tasks/issue_presenter.rb:13:in `map'
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] plugins/redmine_recurring_tasks/lib/redmine_recurring_tasks/issue_presenter.rb:13:in `schedule'
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] plugins/redmine_recurring_tasks/app/views/recurring_tasks/issues/_bottom.html.erb:18
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] plugins/redmine_recurring_tasks/app/views/recurring_tasks/issues/_bottom.html.erb:16
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] lib/redmine/hook/view_listener.rb:62:in `block (2 levels) in render_on'
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] lib/redmine/hook/view_listener.rb:60:in `map'
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] lib/redmine/hook/view_listener.rb:60:in `block in render_on'
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] lib/redmine/hook.rb:66:in `block (2 levels) in call_hook'
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] lib/redmine/hook.rb:66:in `each'
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] lib/redmine/hook.rb:66:in `block in call_hook'
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] lib/redmine/hook.rb:63:in `call_hook'
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] lib/redmine/hook.rb:101:in `call_hook'
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] app/views/issues/show.html.erb:108
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] app/controllers/issues_controller.rb:120:in `block (2 levels) in show'
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] app/controllers/issues_controller.rb:112:in `show'
[274a3e25-8c32-4d15-8d52-d9dc07e9ee5c] lib/redmine/sudo_mode.rb:78:in `sudo_mode'

Problem occur when to_s method is call with an argument in line 10 and 16 (depending on recurring type) from lib/redmine_recurring_tasks/issue_presenter.rb file.

Because date is always the same (2000-01-01), I replace to_s method with strftime method to display only hours/minutes/TZ informations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant