Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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

Edited

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.
Oct 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.

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.
Oct 24, 2019 • edited

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