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

Behaviour - clearError is not able to clear out setError

    Details

    • Type: Bug
    • Status: Done (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 6.1.0
    • Fix Version/s: 6.2.1
    • Component/s: None
    • Labels:
      None
    • Critical Points:
      9

      Description

      Steps to reproduce the problem

      1. Add the script below on the Text type custom field
        def field = getFieldById(getFieldChanged())
        
        if(field.getValue() == "" || field.getValue() == " " || field.getValue() == null)
        {
            field.setError("error message")
        }
        else
        {
            field.clearError()
        }
        
      1. Go to Edit issue screen and prompt errors because the field is null (which is fine)
      2. When user key in value on the field and then submit but error message showing again

      Demo - Screen Recording 2020-06-10 at 12.42.04 PM.mov

      Expected Behaviour

      The clear error should be able to clear the error message when the IF ELSE condition is met.

       

        Attachments

          Issue Links

            Structure

              Activity

                People

                Assignee:
                jechlin Jamie Echlin
                Reporter:
                kkelly Katy Kelly
                Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Structure Helper Panel