Forums

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

Update Asset value based on a Asset issue field when an issue is resolved - complex situation!

Simon Sahli
Contributor
September 27, 2024

Hello everyone,

I have a bit a complex situation and I am wondering if what I want to automate is actually doable given the current functionality in the JSM Cloud.
Upfront, I am also willing to use webhooks or external API / scripting solutions if needed, but as a last resort if no other options are available.


Current situation:
- We are having an issue type, called "Upgrade Projects", where we upgrade a software to a higher version. When creating this issue one has to state to which version, which module will be updated. These are two separated Asset custom fields.

- The issue itself is connected to a customer Asset object via a issue asset custom field. This customer then has one or multiple environment, another linked Asset object. These are test and production environments.

- When a upgrade project is finished, transitioned to DONE, the productive customer environment gets updated with the upgrade version manually within the right asset object.

 

Ideal automated scenario:

- Instead of having to manually update the right customer environment asset object with the upgrade version, which is already available in the upgrade project issue, it should happen automatically once the issue gets transitioned to DONE.


Prerequisite:
- We do have the values that need to be automatically updated like the upgraded version, the productive environment, and which modules
- We do have a connection from the issue to the customer asset object that is then connected to the customer environment asset object.


Question:
- Is this somehow technically possible to automate this with the JSM cloud?
- Is there any automation rule that can be created that achieves the goal in automated the described situation?
- Is there a way with API / webhook/ scripting (scriptrunner) to achieve a solution for this topic?


I know this is complex, thus I really appreciate any input for this situation. Thanks in advance!

Best regards,
Simon

 

 

1 answer

1 accepted

0 votes
Answer accepted
Samuel Gatica _ServiceRocket_
Community Champion
September 27, 2024

Hi @Simon Sahli 

What you described is doable using Automation smart values - Assets

  • Trigger: Issue transitioned
  • Add a Lookup objects to search for the asset that you want to update (you can get the key from the Asset field that is associated to the issue)
  • Add a Branch to update the correct Asset
  • Action: Edit Object attributes using the field smart value.

Example:

Screenshot_1.png

Screenshot_2.png

Screenshot_3.png

 

Hope this helps!

Best regards

Sam

Simon Sahli
Contributor
October 2, 2024

Hi @Samuel Gatica _ServiceRocket_

it does indeed help and I came further with the solution, thank you already for that.

I have though two follow-up questions:

 

  • For the lookup query, I guess the "Server" part is the variable where as the other part are fix. What represents the "Server"?
    • The Asset object itself or the custom field on the issue
  • I have to write the lookup value from one Asset custom field and then write it as a value into the attribute of another Asset object (see the following screen shots).
    • What is the best approach for this scenario?

 


Version-to-Environment.png

 

 

This is the setup in the Asset schemeAsset_CustomerEnvironment and Version.png

 

Thanks a lot for your help!

Best,
Simon

Simon Sahli
Contributor
October 11, 2024

Any idea if what I want to do is technically possible from anyone?

Samuel Gatica _ServiceRocket_
Community Champion
October 11, 2024

Hi @Simon Sahli 

In the automation example, the "Server" field is the Asset object, from the issue you can access any of the attributes using smart values

Using the same smart values you can update other Asset objects using the Edit Object action in Automation.

 

Best regards

Sam

Simon Sahli
Contributor
October 24, 2024

It took me a while, but actually even easier than I thought. 
I could use the "Edit Asset field attribute" action as follows to overwrite the Asset attribute value with the updated version of the right customer environment.
Edit_Assetfieldattributes.png

I didn´t get that one can use the "Edit Asset field attribute" action to update the Asset attribute value of the Asset object. I thought this will only update the Asset value on the issue, but not the actual data within the Assets.
In hindsight this makes sense now, but I guess this is always the case.

Thanks and I hope this will help some other of the community as well!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events