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

Description duplicates on custom Labels field

    XMLWordPrintableJSON

Details

    • Bug
    • Status: To Do
    • Low
    • Resolution: Unresolved
    • 6.40.0
    • None
    • Behaviours
    • 0.8

    Description

      When setting a description for a custom Labels field via Behaviour, while the Description field under the Custom Field Details has already an existing value, the current description will get overwritten by what's being set via Behaviour. The custom Labels field will then have 2 description div elements.

      Steps to Reproduce the Problem

      1. Create a custom field of Labels field type
      2. Give it a Name and Description e.g. Description (Custom Field Details)
      3. For comparison purposes, create another Text Field custom field
      4. Note the current description under the field
      5. Navigate to the Behaviours page > Create Behaviour > map it to a project & All issue types
      6. In the Add Field section, select the custom field you've just created > Add
      7. Create Initialiser and add the following script to it > click Save
        getFieldByName("Custom Labels").setDescription("Description (set via Behaviour)")
        getFieldByName("Text Field").setDescription("Description (set via Behaviour)")
        
      8. Note the description duplicates under the field. The Description (Custom Field Details) text that was set earlier is overwritten by the description set via the Behaviour

      Expected Behaviour

      One of the descriptions should take precedence over the other. For the Text Field, it's the description set via the Behaviour.

      Actual Behaviour

      Both the descriptions added under the Custom Field Details and set via Behaviour appear under the Labels field. The former gets overwritten by the latter.

      Workaround

      Remove the description added to the field under the Custom Field Details section

      Additional Info

      • Reproduced in
        Jira Software 8.20.7 | ScriptRunner 6.40.0
        Jira Software 9.0.0 | ScriptRunner 6.54.0 (latest Jira & ScriptRunner versions)

      Attachments

        Activity

          People

            Unassigned Unassigned
            wkoh Winnie Koh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: