Actions
Defect #40860
closedCreating a new issue fails with an internal error if no issue priorities are defined
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
If no issue priority is defined, creating an issue using issue#create
fails with the following error:
NoMethodError (undefined method `id' for nil:NilClass): app/models/issue.rb:2075:in `clear_disabled_fields' app/controllers/issues_controller.rb:153:in `create' lib/redmine/sudo_mode.rb:78:in `sudo_mode'
This can be fixed with the attached patch which results in a proper error message to be shown to the user:
Priority cannot be blank
Unfortunately, this message is still shown even if the priority field is disabled for a tracker (as we still have to set a priority here, see #38416).
This may be acceptable as a uncommon special case though. If this shall be changed, we might handle this similar to the check for a defined tracker and default status in IssueController#build_new_issue_from_params
.
Files
Related issues
Actions