Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do you set a value in an asset field on create?

Jimi Wikman
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 21, 2023

I am trying to figure out how I can set a value to a custom assets field on Cloud.

In the example I am trying now, I want to fetch a customer from Assets by matching the Reporter. In DataCenter you can use the Assets Post function and simply set the value using object having inR("Jira user" = ${reporter.name}) in the first transition of the workflow, but since cloud does not have asset post functions, how do you do it in Cloud?

I have ScriptRunner, which I assume is the next best thing, but I am unsure how to script this with ScriptRunner...

So, anyone know how to do it and are willing to share?

1 answer

1 accepted

1 vote
Answer accepted
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 21, 2023

I don't know how to do it in scriptrunner, but one option would be to use automation to set the asset field, something like this:

Screenshot 2023-12-21 at 12.53.21 PM.png

It is using the edit issue component and since you are selecting an Asset field all you have to do is enter the AQL in it to get the object.

Jimi Wikman
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 1, 2024

Thank you Mikael, I will try that and see if that works.

Like Mikael Sandberg likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events