Hi community
Using Jira Data Center v8.20.10.
Goal:
To connect assets with persons and have up to date statuses (e.g not in use, in use) for assets.
Situation:
I have a one schema and two object types - "Person" and "Laptop".
"Person" object type (and respective objects) have an attribute called "Laptop" (attribute type "Object" -> "Laptop")
1. Object "Human" (in object type "Person") is updated with an attribute called "Laptop" -> new value is "Computer".
2. Object "Computer" in object type "Laptop" has now 1 inbound reference -> object "Human".
3. Object "Computer" has an attribute (type Status) called "Laptop status" and current value is "Not is use"
4. Now that "Computer" got an inbound reference, the attribute "Laptop status" for object "Computer" should be automatically updated and given a new value "In use"
So I created an automation (screenshot), but it does not seem to work. What am I missing? Could it be that the trigger is wrong (e.g adding new inbound reference does not count as "Object updated"?) or can anyone recommend a better/other way to solve this?
Thanks
Alice
The issue with what you have is that the "Object Updated" event fires on the Human object. There is no visible change or event fired on the Computer object.
The "IF" block won't allow you to fetch another object. It's only meant as a filter for objects associated with the Trigger.
You have 2 options.
1) Continue to use Object Updated trigger and write a groovy script to serve as the Action.
2) Use a Schedule Trigger with the following IQL:
objectType = Laptop and object having inR(objectType=Person) and "Laptop status" != "In use"
You can set your schedule fairly small (maybe 15 minutes). The vast majority of the time, the IQL will return zero results and no further actions will take place. When 1 or more Person has been updated in the last 15 minutes, then those will have their corresponding status updated.
In your Action block for the attribute value, just type "In use". No need for ${}.
You might also want a second automation to perform the reverse action
objectType = Laptop and object not having inR(objectType=Person) and "Laptop status" = "In use"
So that you can change the Laptop status from "In use" back to "Not in use"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.