Problem in Automation for JIRA Edit Issue

GG
Contributor
February 14, 2020

Hi,

I want update single select field values based on other single select value. I use this sample code, but I received error "Error while parsing additional fields.Not valid JSON ":

Scenario is : I have tow single select list fields. When I select one option in firs field I want remove some options in second field.

 

{
  "expand": "projects",
  "projects": [
    {
      "expand": "issuetypes",
      "self": "https://jira.atlassian.com/rest/api/2/project/10240",
      "id": "10240",
      "key": "JRA",
      "name": "Jira (including Jira Core)",
      "avatarUrls": {
        "48x48": "https://jira.atlassian.com/secure/projectavatar?pid=10240&avatarId=17294",
        "24x24": "https://jira.atlassian.com/secure/projectavatar?size=small&pid=10240&avatarId=17294",
        "16x16": "https://jira.atlassian.com/secure/projectavatar?size=xsmall&pid=10240&avatarId=17294",
        "32x32": "https://jira.atlassian.com/secure/projectavatar?size=medium&pid=10240&avatarId=17294"
      },
      "issuetypes": [
        {
          "self": "https://jira.atlassian.com/rest/api/2/issuetype/10000",
          "id": "10000",
          "description": "",
          "iconUrl": "https://jira.atlassian.com/secure/viewavatar?size=xsmall&avatarId=51505&avatarType=issuetype",
          "name": "Suggestion",
          "subtask": false,
          "expand": "fields",
          "fields": {
            "summary": {
              "required": true,
              "schema": {
                "type": "string",
                "system": "summary"
              },
              "name": "Summary",
              "hasDefaultValue": false,
              "operations": [
                "set"
              ]
            },
            // other fields removed for brevity...
            "components": {
              "required": false,
              "schema": {
                "type": "array",
                "items": "component",
                "system": "components"
              },
              "name": "Component/s",
              "hasDefaultValue": false,
              "operations": [
                "add",
                "set",
                "remove"
              ],
              "allowedValues": [
                {
                  "self": "https://jira.atlassian.com/rest/api/2/component/36920",
                  "id": "36920",
                  "name": "System Administration - Support Tools"
                },
                {
                  "self": "https://jira.atlassian.com/rest/api/2/component/43995",
                  "id": "43995",
                  "name": "User Management - Delete User"
                }
              ]
            }
            // other fields removed for brevity...
          }
        }
      ]
    }
  ]
}

 

 

 

2 answers

0 votes
GG
Contributor
February 15, 2020

Thank you for your reply.

Is there any commend to remove options from single select list?

JP _AC Bielefeld Leader_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 15, 2020

Hi,

don't know. I would ask the app devs.

Best

JP

GG
Contributor
February 15, 2020

Thanks

0 votes
JP _AC Bielefeld Leader_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 15, 2020

HI,

check, if the forward slash in 

Component/s

must be escaped...

Best

JP

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events