On my issue type, I created a custom field to reference Insight objects.
When I update that issue field (when I add a reference to an Insight object) I want to automate the value of an attribute of the referenced Insight object.
My Insight object has an attribute called "Stock" and I would like to update that value to its own value, minus 1.
That is : my Insight object has a "Stock" value of 10. When I reference this object on my issue, I want to update that stock value to 10-1 (9).
The automation rule gets triggered, but the value of Stock becomes -1 instead of 9. I bet the problem is with "object.Stock". What am I doing wrong?
For the sake of completion, with the help of Atlassian support, I was able to generate the rule. I needed a Global Automation rule with the following settings:
I created a reverse rule to increment the Stock value by 1 when an Insight object is removed from my field as well. It is basically the same rule but with {{#deletedfieldChange.values}} when "Change type" is "Value deleted".
It works as expected, when one (or more) Insight object(s) are added/removed from the field.
Hello @Arnaud Marquis
saw your thread after I was looking for a solution to use the content of fields within object change triggers in insight.
Unfortunately, neither "When: Field value changed" nor "Then: Create variable" exists as options in the automation rules I can define.
What am I missing here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Arnaud Marquis
This is an interesting use case. I have done something similar previously, but I was mainly extracting the data from the Insight schemas.
Looking at the rule, I think it is not able to point/ gather the exact 'Stock'. So the question is stock for what?
I believe you would have some other Custom Field where you would be storing the item whose stock would need to be depleted. Replace the word 'object' with that field name and try. It should work.
Please find below the screenshot of my implementation. Kindly accept the answer if this helps.
Regards,
GG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Gaurav thanks for your answer.
So the question is stock for what? - Stock (which is a custom Insight object attribute) of that specific referenced object. As I said, it "works" as it updates the stock value of the Insight object I am after. Just not with the right value.
I believe you would have some other Custom Field where you would be storing the item whose stock would need to be depleted. Replace the word 'object' with that field name and try. - No, there is no additional custom field. Just the attribute.
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.