I am working with Jira/JSM Data Center.
I want to set up an Automation to run every week to select assets that have a date within the past 2 weeks.
For these assets I want to copy the value in one attribute to another attribute.
In Jira DC the Automation for Jira feature does not support specifying an AQL in the Schedule trigger (as far as I can tell). And I don't see an Advanced Branching feature (like in Cloud) that would allow me to iterate over a set of objects returned by the ScriptRunner action Lookup Asset (Insights) objects from AQL (IQL) with ScriptRunner
Looking at the Automation feature within Assets itself I see I can set up a scheduled rule and include AQL in the trigger.
I haven't been able to determine if there is a method within the Edit action to then set one attribute using the value of another attribute. The documentation doesn't show an example of doing that, and my internet searches have not yielded any useful information.
Hi,
You can use the "old" Asset automations to do this. In the object schema configurations, add an automation rule triggered on scheduled event. Then setup the action "Update Attribute value" to copy the attribute value. Use asset placeholders to get source attribute value ${source attribute} to update the target attribute
/Björn
Placeholders, of course!
I'm still learning my way around Assets, and finding answers searching the internet requires that the correct question be asked. I had forgotten the term "placeholders".
This was exactly what I needed @Björn Gullander Eficode . Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Currently, there is no built-in automation rule available to execute this action directly.
However, you can utilise Groovy scripting within the Assets automation to achieve this functionality. For instance, the example titled ‘Update an object attribute’ found in the default examples set might provide the guidance you need, albeit with some additional coding.
For further details, please refer to the documentation here: https://confluence.atlassian.com/servicemanagementserver0512/groovy-script-examples-1402408458.html.
I hope this information proves helpful.
Best regards,
Kunal Kanojia
Jira Service Management DC Team
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for that suggestion @Kunal Kanojia .
I will spend some time working on that to see if I can generate a script to accomplish the tasks. I'll report back here how that turns out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
While @Björn Gullander Eficode 's answer satisfies the simple requirement for the question I posted, your answer will also be valuable. I have another scenario where I need to schedule selection of Assets and create an issue for each one. The issue types I am creating have a required field that I'm not seeing a way to set in the Create Issue action within Assets Automation, so I think the Groovy script option will be the solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.