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

Behaviours set Description added multiple times

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • High
    • Resolution: Fixed
    • 5.0.14
    • 5.3.0
    • Behaviours
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: