This issue has been created
 
 
Release Notes Application / cid:jira-generated-image-avatar-037e2757-548e-4211-bf2d-a9787d0eb013 RN-130 Open

Add Importance#getName and Importance#fromName so that callers stop parsing importance names themselves

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-cbdc42d8-3b2a-4510-867d-adacc194737c Vincent Massol created this issue on 30/Sep/26 15:22
 
Summary: Add Importance#getName and Importance#fromName so that callers stop parsing importance names themselves
Issue Type: cid:jira-generated-image-avatar-037e2757-548e-4211-bf2d-a9787d0eb013 Improvement
Assignee: Unassigned
Components: Application
Created: 30/Sep/26 15:22
Priority: cid:jira-generated-image-static-major-6f89d1b2-c21e-46f6-ba84-71eef0420cc6 Major
Reporter: Vincent Massol
Description:

The Importance enum of the Java API only converts to and from the number an importance is stored as (0/1/2). The name a person or a client writes (low/medium/high) was therefore parsed twice, once by the change query parser and once by the REST representation factory.

This adds, to the @Unstable Importance enum:

  • getName(): the lower cased name of the importance, e.g. high
  • fromName(String): the importance of that name, whatever its case, or null

and makes both callers use them. No behaviour change for users.

Done along with an internal refactoring giving the ChangeClass/EntryClass schema of a change a single owner in the -api module (property names, reading, and writing over the template or replacing).