Hello everyone,
Objective: When client submits a jira ticket, I would like to extract their organization ID from the organization name field in the jira ticket through an automation rule.
I have been following https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization/#api-rest-servicedeskapi-organization-get this tutorial and was able to extract a collection of ALL organizations (and their associated ID's), however there does not appear to be a way to actually query based on the organization name.
Does anyone know of any way I could extract the organization ID based on the organization name in an automation rule?
Thank you very much
Hi @Tom Daudelin - It is possible to capture the Organization ID and Name with a smart value. Organization is simply another custom field so you need the ID and then this is how you would capture the name and ID respectively:
{{issue.customfield_xxxxx.first.name}}
{{issue.customfield_xxxxx.id}}
Hello Mark, but this solution would require either the client to know their internal Jira ID or it would require us on our end to know their IDs.
This is not optimal for us.
For one: This leaves us open to human error in a context of highly sensitive data (i.e should we accidentally input the wrong ID, we could be exposing data to the wrong organization).
For two, we do not know the organization's IDs to begin with. Furthermore, we cannot locally store any of these Organization:ID key value pairs given that at any point an organization we work with can change their name. And when managing an evironment with hundreds of organizations, that is a recepie for disaster.
Finally, it would be best to leverage what is already being stored by jira through : 'https://your-domain.atlassian.net/rest/servicedeskapi/organization' rather than copy it as a static table on our end.
We would like to pull the ID at runtime or find a way to store the ID's locally in a way that is scallable and dynamic.
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think it would help to take a step back and better understand what exactly you're trying to accomplish. I interpreted that you wanted to establish automation rules but were unable to capture the Org ID. Based upon that premise, the organization is captured as the customer generates a request and that value is stored on the organization field with the issue. So, if you're trying to get the organization ID from a specific issue for the purposes of automation, you can get it as I shared in my last post.
If this is not the intent, please share a bit more about the process you're trying to automate (how you want it triggered, desired action(s) to occur, conditions, etc.).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ahhhhh, I understand now!
Thank you so much for the help.
In automation, {{organizations.id}} returns the organizations id as desired.
Thank you so much for the help!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you are using jira automation to find the `organization id` by `organization name` you can use the REST api for creating the organization. It also gives the organization id if the name already exists (and does not create a duplicate organization).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI @Mark Segall ,
I do have a use case until atlassian can fix the bug in API-482
[API-482] Not possible to use statusCategory in a JQL filter query in a MS Teams Channel - Create and track feature requests for Atlassian products.
MS Teams Tab not returning results when filtered b... (atlassian.com)
Any chance of a workaround that i can use the Org ID in a filter?
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.