The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

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

__ Jimi Wikman
Community Champion
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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Answer accepted
Mikael Sandberg
Community Champion
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
Community Champion
January 1, 2024

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

Like • Mikael Sandberg likes this
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events