Project

General

Profile

Actions

Patch #40194

closed

Fix error in clear_disabled_fields method when IssuePriority is missing

Added by Yazan Al aeddin 10 months ago. Updated 14 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Issues
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Hello

The clear_disabled_fields method in the Redmine codebase raises a NoMethodError exception when called,
and the IssuePriority model is missing. This occurs due to an attempt to access the id attribute of IssuePriority without verifying its presence. The proposed fix ensures that the method gracefully handles the case where IssuePriority is missing by checking for its presence before accessing its attributes.
I propose this patch


Files

clear_disabled_fields.patch (1.3 KB) clear_disabled_fields.patch Yazan Al aeddin, 2024-02-05 16:56

Related issues

Related to Redmine - Defect #38636: NoMethodError when creating/updating an issue if all issue priorities are disabled and no default priority is setNew

Actions
Is duplicate of Redmine - Defect #40860: Creating a new issue fails with an internal error if no issue priorities are definedClosedGo MAEDA

Actions
Actions #1

Updated by Go MAEDA 10 months ago

  • Related to Defect #38636: NoMethodError when creating/updating an issue if all issue priorities are disabled and no default priority is set added
Actions #2

Updated by Ondrej Masita 9 months ago

Default Docker Hub image will error out when issue is created with same error, because Priority field is marked mandatory and enumeration contains no values. This makes out-of-box-experience frustrating, because the solution does not work. This is covered in https://www.redmine.org/boards/2/topics/17160.

Actions #3

Updated by Go MAEDA 14 days ago

  • Is duplicate of Defect #40860: Creating a new issue fails with an internal error if no issue priorities are defined added
Actions #4

Updated by Go MAEDA 14 days ago

  • Category set to Issues
  • Status changed from New to Closed

The same fix was committed in r22895 (#40860).

Actions

Also available in: Atom PDF