Hello,
I'm looking to connect our CRM to our JIRA instance via API. Essentially that I'm trying to do is let agents in our CRM connect a ticket from a customer to a ticket in JIRA and then track how many such tickets in our CRM have been connected to a single JIRA ticket.
But, (and I'm not sure if it's possible), I can't seem to find the right way to format the json.
What I'm trying is:
PUT: https://OURURL/rest/api/2/issue/TST-1/
with this json:
{
"fields": {
"custom_field_11400" : {{issue.customfield_11400}}+1
}
}
What I need to figure out is what is the proper way to reference the custom field itself in the json so that I can add 1 to that value when the agents want to connect in a new ticket.
Thanks!
Brandon
You can't do this in a single REST API call to Jira. You would have to first do a GET call to that same endpoint, GET /rest/api/2/issue/{issueIdOrKey} and then lookup the value of that specific custom field.
Only after you do this, could you then use a second call to PUT /rest/api/2/issue/{issueIdOrKey} and then pass this the updated value in order to change the field value. I can't think of anyway that you could only make one call and both find out the value and update it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.