We use Jira Asset Management and have a [Unit] object with an Attribute that we have configured with the "Organization". When requestors submit a new ticket, the [Unit] Asset field is on the request intake. I want to use automation to have Jira lookup the Organization attribute in the Asset record for the Unit and then set the Organization on the Issue to that value.
I see in the automation that I can set a value on the Asset but can't seem to find where I would lookup from the Asset and subsequently set a field value on the Issue itself. Thoughts? s
First, you need to create another custom field for where you want to store the info about Organization if it's not already done.
After that, you can use the Lookup objects action in Automation and the request would be : objectType = Unit and Key = {{issue.unit}} (unit being you're customfield here)
Finally, you add another action Edit issue, you choose your field and you add the info by using the smart value {{lookupObjects.Organization}}
If the Organization attribute refers to another Assets object, I'd create an Assets custom field to store the Organization. If not you can create a simple text field.
Hope this helps.
Thank you! I think I'm close. I put a 'log' step in there to verify it's pulling the Attribute from the Object, and it is. But then I get a parsing error. First image is from the automation log - shows "Albuquerque" which is the Unit Name ... and this is what is output to the log: {{lookupObjects.Organization (Jira)}}
Then I try to edit the issue with the second image below, which is giving the parsing error. Not sure what I'm doing wrong.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your JSON that you are using is missing "" around the smart value, try this:
{
"fields": {
"organizations": {{lookupObjects.Organization (Jira)}}"
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay, getting closer. It doesn't like the text value that's in that attribute. I wants a numeric. Do I have to change the data type for the field or is there some magic I can do?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And this is what the script looks like right now - I had to surround it in brackets as it is expecting an array:
{
"fields": {
"Organizations": ["{{lookupObjects.Organization (Jira)}}"]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay, so you need to map your Asset org to the number that JSM is using for the Organization field (much similar to user picker fields that takes the user's Atlassian ID). If you go to Customers in your JSM project and click on an org you will see that the URL ends with at number (.../jira/servicedesk/projects/SIT/organization/2), that is what the field is expecting. So you could add that number as an attribute on your organization in Assets and then get it using object reference like this:
{{lookupObjects.Organization (Jira).(attribute name)}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you!! I’m cooking…
Because Jira Automation was expecting a number, I think the double quotes were screwing things up (meaning, I think I needed to convert the text back to integer somehow), but the workaround for that was creating an attribute name with no spaces. I’m also going to change the value of the attribute from the name of the Unit to the internal Org ID as you noted. Thanks for the quick help and guidance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It should be pretty straight forward, all you have do is add the lookup object component and set it up to search your object schema and then use the selected unit to find the object. Then you can use {{lookupObjects.Organization}} to set Organization.
Something like this:
In this case I am looking up departments based on what was selected on the form and then get attributes from that object to set the approvers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'd like to use this in Jira Business Project. Why is the functionality only available in JSM?
Do you know if there are any plans to make it available in Jira (fka Software or Workmanagement) ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Anne Warmer,
This should be its own question, but the main reason is that Assets is a functionality that is par of JSM. You are still able to use an assets field in Jira, but in order to have access to it you need to have JSM access.
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.