Uploaded image for project: 'Automation for Jira Server'
  1. Automation for Jira Server
  2. JIRAAUTOSERVER-207

#changelog formula doesn't work with Components and Fix Version fields

    XMLWordPrintable

Details

    • Bug
    • Resolution: Tracked Elsewhere
    • Low
    • None
    • 7.4.0, 9.0.3, 8.2.3
    • Smart-values
    • Severity 3 - Minor
    • 0

    Description

      The changelog smart value does not work as expected with the 3 fields below:

      • Fix Version/s
      • Affects Version/s
      • Component/s

      The purpose of this bug report is to list 2 issues related to this smart value.

      Issue 1

      This issue only affects the Fix Version/s field.

      In the Smart Value documentation for Automation For Jira Data Center, we suggest to use the following expression to iterate over the Fix Versions from the changelog smart value:

      {{#changelog.fixVersion}}{{toString}}{{/changelog.fixVersion}}
      

      This syntax does not work: no value is returned at all, in any scenario.

      This syntax works "better" when we replace "fixVersion" with "Fix Version": in some scenarios, it returns a value, and in some scenario it does not (see the Issue 2 below).

      Issue 2

      This issue affects all the fields below:

      • Fix Version/s
      • Affects Version/s
      • Component/s

      Depending on how these fields are updated, the toString and the fromString syntax might or might not return the right old and new content of these fields.

      For example, if the Fix Version/s field contains 1 value and a 2nd value is added to it, the "fromString" value will show an empty value
      or, if the Fix Version/s field contains 2 values and 1 value is removed, the "fromString" value will only show the value that was removed instead of showing the 2 values.

      Examples illustrating Issue 2

      1. Create a rule with 2 log actions using the syntax below:
        • Action 1
          Old Component = {{#changelog.component}}{{fromString}}{{/changelog.component}}
          
        • Action 2
          New Component = {{#changelog.component}}{{toString}}{{/changelog.component}}
          
      2. Add 1 component to a Jira issue
        • Check the audit logs (Step 1)
      3. Add a 2nd component to the same Jira issue
        • Check the audit logs (Step 2)
      4. Add a 3rd component to the same Jira issue
        • Check the audit logs (Step 3)
      5. Remove all the components all at once
        • Check the audit logs (Step 4)
      6. Add the components back all at once
        • Check the audit logs (Step 5)

      Observed results in the audit logs

      • Step 1: the from value shows an empty value
      • Step 2: the from value shows an empty value, and the to value only shows 1 value
      • Step 3: the from value shows an empty value, and the to value only shows 1 value
      • Step 4: the from value and the to value are correct
      • Step 5: the from value and the to value are correct

      Attachments

        1. AuditLog_Step1.png
          AuditLog_Step1.png
          29 kB
        2. AuditLog_Step2.png
          AuditLog_Step2.png
          29 kB
        3. AuditLog_Step3.png
          AuditLog_Step3.png
          29 kB
        4. AuditLog_Step4.png
          AuditLog_Step4.png
          35 kB
        5. AuditLog_Step5.png
          AuditLog_Step5.png
          35 kB
        6. PreviousVersion.png
          PreviousVersion.png
          286 kB
        7. Screenshot 2023-12-01 at 10.53.16.png
          Screenshot 2023-12-01 at 10.53.16.png
          319 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              asweeten ASweeten
              Votes:
              17 Vote for this issue
              Watchers:
              19 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: