Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Keep track of insight asset number

Arnaud Marquis April 22, 2022

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?

1 answer

0 votes
Dave Mathijs
Community Champion
April 22, 2022

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:

  • From 'in stock' to 'in use' when an asset is linked to a user
  • From 'in use' to 'in stock' when an asset is unlinked from a user
Arnaud Marquis April 22, 2022

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.

Arnaud Marquis April 25, 2022

@Dave Mathijs no further help?

Dave Mathijs
Community Champion
April 25, 2022

Is your stock count a jira custom field or an attribute of the object?

Arnaud Marquis April 25, 2022

@Dave Mathijs It is an Insight object attribute.

Dave Mathijs
Community Champion
April 25, 2022

Maybe this KB article can help you: Update Insight object attribute values using automation

Arnaud Marquis April 25, 2022

@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?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events