Skip to content

Conversation

@quynh1-nguyenthinhu
Copy link

The current UI allows the user to set unrealistically long sprint durations, e.g. 10 years.
When the user sets such a long duration, it is mostly by a mistake
But it causes the backlogs plugin to throw errors:

App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] Started GET "/redmine/rb/burndown/6/embed" for 172.17.0.1 at 2023-10-04 03:27:47 +0000
App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] Processing by RbBurndownChartsController#embedded as HTML
App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] Parameters: {"sprint_id"=>"6"}
App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] Current user: admin (id=1)
App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] Rendered plugins/redmine_backlogs/app/views/rb_burndown_charts/show.html.erb (Duration: 740.2ms | Allocations: 448897)
App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] Completed 500 Internal Server Error in 766ms (ActiveRecord: 22.2ms | Allocations: 452001)
App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75]
App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] ActionView::Template::Error (Mysql2::Error: Data too long for column 'burndown' at row 1):
App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] 13: <script type="text/javascript" language="javascript">
App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] 14: <%-
App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] 15: burndown = sprint.burndown
App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] 16: series = burndown.series.sort{|a, b| l("label_#{a}") <=> l("label_#{b}") }
App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] 17: dates = sprint.days
App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] 18:
App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] 19: tz = RbIssueHistory.burndown_timezone
App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75]
App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] plugins/redmine_backlogs/app/models/rb_sprint_burndown.rb:140:in get_burndown' App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] plugins/redmine_backlogs/app/models/rb_sprint_burndown.rb:49:in series'
App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] plugins/redmine_backlogs/app/views/rb_burndown_charts/_burndown.html.erb:16
App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] plugins/redmine_backlogs/app/views/rb_burndown_charts/show.html.erb:3
App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] plugins/redmine_backlogs/app/controllers/rb_burndown_charts_controller.rb:14:in block (2 levels) in embedded' App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] plugins/redmine_backlogs/app/controllers/rb_burndown_charts_controller.rb:13:in embedded'
App 300 output: [3c6d2fb8-f3c0-4e6f-b764-99a1acd54c75] lib/redmine/sudo_mode.rb:61:in `sudo_mode'

And burndown chart cannot be displayed:
image

Therefore, we limit the maximum sprint length to 3 months to prevent error when display burndown chart of sprint with unrealistically long sprint duration:
image

…play burndown chart of sprint with unrealistically long sprint duration
@ichylinux ichylinux merged commit 3484aba into maedadev:master Oct 16, 2023
@ichylinux
Copy link
Collaborator

hi, @quynh1-nguyenthinhu

thank you for this PR.

i have no objection on this!

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.

2 participants