Uploaded image for project: 'Release Notes Application'
  1. Release Notes Application
  2. RN-130

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

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • 2.8
    • 2.7
    • Application
    • None
    • Unknown

    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).

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: