Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

REST API: set value "Automatic" for Insight field

Michael Bachmann
Contributor
November 14, 2018

Hello,

we are creating issues from external applications using Jiras REST API which works very well.
We also have some Insight custom fields that use an assign scope so when creating a new issue within Jira you can select the value "Automatic" to let the field be filled automatically using the defined IQL.

Is it somehow possible to set that value "Automatic" using the REST API and would Insight even be triggered that way?

REST API

/rest/api/2/issue

Body

{
"fields": {
"project": {
"id": "10000"
},
"summary": "something's wrong",
"issuetype": {
"id": "10003"
},
"reporter": {
"name": "admin"
}
},
"description": "bla blub",
"customfield_10505": {
"value": "Automatic"
}
}

Greetings,
Michael

1 answer

1 accepted

0 votes
Answer accepted
Yinon Negev
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.
November 19, 2018

Hi Michael.

       The label "Automatic" is showing in a CF (as a "Placeholder") whenever there is a Filter Assign Scope defined for the CF in the Insight CF configuration. In order to trigger the Filter Assign scope, please set the following in the JSON for the CF:

"customfield_10505": [{ "key": "AUTOMATIC-ASSIGN" }]

Note that your JSON contains an extra "}" after "reporter" that needs to be removed:

{
"fields": {
"project": {
"id": "10000"
},
"summary": "something's wrong",
"issuetype": {
"id": "10003"
},
"reporter": {
"name": "admin"
},
"description": "bla blub",
"customfield_10505": [{ "key": "AUTOMATIC-ASSIGN" }]
}

Kind regards,

Yinon

Team Riada

Michael Bachmann
Contributor
November 27, 2018

Thank you very much for the answer, that helps us a lot! :)

Suggest an answer

Log in or Sign up to answer