Uploaded image for project: 'SR for Jira - Development'
  1. SR for Jira - Development
  2. SRJIRA-3458

Extract readable messages from JQL parsing exceptions when validating subqueries

    Details

    • Type: Change
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5.6
    • Component/s: JQL Functions
    • Labels:
      None
    • Critical Points:
      0.8

      Description

      In the QueryValidator, we extract the message property from the cause of any exception raised, or, failing that, from the exception itself. In the case of a JqlParseException, however, this message is usually just a stringification of the original underlying Exception object and isn't very informative or user-friendly. Instead, this class provides a parseErrorMessage property of type JqlParseErrorMessage, which can be converted into a human-readable String via its getLocalisedErrorMessage method.

      Given the frequency with which QueryValidator is likely to encounter JqlParseException in particular, it would make sense to special-case it in the catch block so we can extract the better message.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jchoules Joanna Choules
              Reporter:
              jchoules Joanna Choules
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: