I want to fill in a project picker field with Automation for Jira

Marco Brundel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 24, 2019

How is it possible to fill a customfield project picker field with Automation for Jira.

On our Jira Cloud i've a customfield project picker field with customFieldId=11581.

I tried 

"customfield_11581" : { "value": "Projectname" }

and also

"customfield_11581" : { "id": "12211" }

 

2 answers

1 vote
Marco Brundel
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.
October 28, 2019

For sure, you're in the right way, just need to make some adjustments into your code.
Follows below a code that I've built for you to this case:

{

    "update": {

        "Oplosgroep Jira Project": [

            {

                "set": {"id": "12211"}

            }

        ]

    }

}

The code above I've utilized the field name "Oplosgroep Jira Project", because will be easy to manage.
But you can use the custom field ID, as follow below:

{

    "update": {

        "customfield_11581": [

            {

                "set": {"id": "12211"}

            }

        ]

    }

}

Note: This id: 12211 need to be one of field value id.

Aron Kuch October 25, 2023

That worked for me. Thank you!

0 votes
frother
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 24, 2019

Hi Marco,

Thanks for getting in contact.

It appears that the Jira rest API for the project custom field is broken. The correct syntax is as you say:

"customfield_11581" : { "id": "12211" }

Although even hitting the rest API directly, the request is successful, but the field never updates. 

https://developer.atlassian.com/server/jira/platform/jira-rest-api-example-edit-issues-6291632/

Sorry,
Scott

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events