I have created assets in Insight and a reference to my asset type in Jira issues. Is there a way that I can keep track of how many of each asset is in stock?
What I would like to achieve is that when I reference an asset on an issue, the number of assets "in stock" gets decremented by 1. If I remove the asset from the issue, the stock number should be incremented by 1.
How would I achieve that?
Hi @Arnaud Marquis welcome to the Atlassian Community!
By referencing an asset on an issue, you actually mean linking an asset to a user, correct?
You could try automation to change the status of the asset:
Hi, not exactly. These assets are "articles". Let's say for exemple I have an asset called "Printer toner cyan". We don't need to have 1 asset created for each article (they are all the same, they do not have anything specific to them like a serial number or such). All I need to know is how many of them are "in stock".
I'd rather have 1 asset called "Printer toner cyan" and have a custom field with the number of these assets "in stock", say 10.
When I reference this specific printer toner on an issue, I'd like that custom field to be decremented by 1. That means, if I view the "Printer toner cyan" in Insight, I should now see that we have 9 in stock. If I remove that asset from the issue, the stock number should be back to 10.
These assets are not linked to a user or a customer. They would just be linked to an issue.
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.
Is your stock count a jira custom field or an attribute of the object?
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.
Maybe this KB article can help you: Update Insight object attribute values using automation
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Dave Mathijs Thank you. I am new to this and it doesn't work yet.
I created a new automation rule, selected the "Edit Insight field attribute", selected the Insight field and the "attribute to set" (my attribute is called "En stock") and wrote the following:
{{#=}}{{object.En stock}} - 1{{/}}
All what that does is that it sets the attribute value to "-1" instead of taking the existing attribute value and substracting 1. Am I missing anything?
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.