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

JSON validation for advanced field configuring is broken

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a bug
    • Icon: Low Low
    • None
    • 7.2.1, 7.2.2, 7.2.0, 7.1.9, 7.1.17, 7.2.3
    • Actions, Fields
    • None
    • Severity 3 - Minor

      Issue Summary

      Upon attempting to utilize the "update" function (rather than "fields") in the advanced field configuring, A4J will incorrectly refuse a valid JSON format as if the 'add', 'set', and 'edit' functions were not present.

      Steps to Reproduce

      1. Create a new rule in A4J using any trigger
      2. Add an Edit issue action and expand the "Advanced Configuration" settings.
      3. Input the same JSON featured on the Advanced field editing article.
        {
            "update": {
                "description": {
                    "set": "a new description"
                },
                "labels": [{
                        "add": "test-label"
                }]
            },
            "fields": {
                "summary": "woohoo! a new summary"
            }
        }
        
      4. Upon saving the rule, A4J will provide the following error message on the UI:

        Additional fields contains invalid 'update' operations for field 'description'. You can use 'add', 'remove', 'set' or 'edit' for operations.

      If you remove the quotes around 'set' and 'add', A4J will accept the JSON as valid, however, the rule will fail during the execution with the following error:

      Some errors:
      Action details:
      Edit issue
      Error while parsing additional fields. Not valid JSON.

      Expected Results

      A4J successfully accepts the JSON format informed on our official documentation.

      Actual Results

      Valid JSON's are not accepted by the tool, while invalid ones are.

      Workaround

      Avoid the usage of the Advanced Field Editing feature along with 'update'.
      Currently, there is no known workaround for the use of the update function. A workaround will be added here when available

              Unassigned Unassigned
              abrancalhao@atlassian.com Armando Neto
              Votes:
              3 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: