Situation : I will be creating issues via the rest API from a CRM. Since I cannot force the issue ID on creation and since I'm unable to store the response in some sort of DB, I won't be able to update these issues via API.
Was thinking of setting a custom field or meta data containing that ID from the CRM and then use it to get the issue or simply update the issue directly, yet these are always requiring an issue ID or key.
Any thoughts? Suggestions?
Edit: found a solution to my issue so I don't have to use a DB. Yet the question itself is still valid for future reference ;)
Hi @Nour Dandan
This is a common scenario when integrating external systems with Jira. I listed the steps below that I'd follow to achieve such an integration
- create a custom Field in Jira (name it as CRM ID)
- send this CRM ID during the issue creation (or update)
URL: /rest/api/2/field
body:
{
"fields": {
"summary": "Issue from CRM",
"project": {"key": "PRJ"},
"issuetype": {"name": "Task"},
"customfield_XXXXX": "CRM-12345"
}
}
where PRJ is the project key, XXXXX is the customfield id for CRM ID field and CRM-12345 is the CRM ID.
- use JQL to searching the issue
GET /rest/api/2/search?jql=customfield_XXXXX="CRM-12345"
- update the issue using the key
PUT /rest/api/2/issue/PROJECT-123
{
"fields": {
"summary": "Updated issue summary"
}
}
I hope this was helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.