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

Custom fields in JPD automation

Joshua Cassin October 3, 2023

Hi there,

In our Jira Discovery Project i have a check box field that i want automatically checked if there are certain conditions met. I have been able to fulfill the JQL search to find the DIY cards that need this field checked. However as it is a custom field i can not select it in the drop down and need to use the advanced edit. 

from the Docs something like this should work

{
    “update”: {
        “customfield_10179": [{
                “add”: { “value”: “option1” }
        }]
    }
}

or 

{
    “update”: {
        “customfield_10179": [{
                “add”: { “value”: “True” }
        }]
    }
}

alas, neither of these seem to work and Jira Product Discovery doesn't seem to show custom fields, so i can't check further details of the field. Is anyone able to help/guide?

2 comments

Omer Meshar
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 3, 2023

Try this:

{
    "fields": {
         "customfield_10179": 1
    }
}
Like # people like this
Ritika Kapoor October 3, 2023

This works like a charm!

Like Omer Meshar likes this
Gomez, Daniel October 5, 2023

@Joshua Cassin This json above worked for me too, you will have to go into the api to get the ID number:

https://<yourjirainstance>.atlassian.net/rest/api/3/field

I hit ctrl+f and searched for the checkbox field name, you will see something like this:

["cf[12688]","<customfieldname>"]

Gomez, Daniel October 3, 2023

Single select:

{
"fields": {
"customfield_12222" : { "id": 12345 }
}
}

 

Cascading select:

{
"fields": {
"customfield_12222" : { "id": 22222, "child": { "id" : 33333 } }
}
}

Joshua Cassin October 3, 2023

How do you know the "id" ?

Gomez, Daniel October 3, 2023

@Joshua Cassin 

 

one way to find it is:

settings/issues/custom fields/edit(click on edit in the ellipsis to the right of the custom field)the ID will show in the URL at the end

for select and cascading select instead of edit click on contexts and default value to see parent and child ID's under the custom field

Joshua Cassin October 4, 2023

@Gomez, Daniel   That works for normal projects, but in the case of the JPD project custom fields are not shown there.

settings/issues/custom fields

Omer Meshar
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 7, 2023

You can find the id of your custom field by getting the issues of JPD in a regular filter of Jira software, adding the custom field you want as one of the columns and then clicking on it to order by it. In the filter - you will see the id of the field you just ordered by:

JPD1.png

Like Joshua Cassin likes this

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events