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

Behaviours set Description added multiple times

    Details

    • Type: Bug
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 5.0.14
    • Fix Version/s: 5.3.0
    • Component/s: Behaviours
    • Labels:
      None
    • Critical Points:
      0

      Description

      Assign the following behaviour to the priority field 

      void setEnvironmentWhenHighPri() {
          FormField formField = getFieldById(PRIORITY)
          FormField descField = getFieldById(DESCRIPTION)
      
          if (formField.getValue() == "1") {
              descField.setDescription("<div class=\"warningBox\">Please explain why priority is Blocker.</div>")
          }
          else {
              envField.setDescription("")
          }
      }

      And change the value of the priority to highest. You will see a

      <div class=\"warningBox\">

      Under the description filed but

      • not in the right position 

      Then change the value of the priority field to something else

      • The description message is still there

      Change the priority value to Highest again

      • It will create another one div 

      There is already a failing test for this 

      com/onresolve/jira/groovy/functional/behaviours/TestBehaviours#testSetDescription()

        Attachments

          Activity

            People

            Assignee:
            jechlin Jamie Echlin
            Reporter:
            tbatagiannis Thanos Batagiannis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: