Is there a way to create an automation that will create an issue and select one random insight asset to use in a field?
The asset needs to be random for compliance purposes.
Hi @DavidBernardoSI1996 -- Welcome to the Atlassian Community!
Although I have never done that before...I wonder if you could use a combination of features of automation for Jira features to do this:
Kind regards,Bill
Hi thanks for the help, I've almost got the solution, there is just one last problem trying to access the index I want in a lookupObject.
First I'm creating a lookupObject, then I use the size of that lookupObject to get a random number between 1 and the total number of entries of the object, like so:
After that I use another variable to do minus(1) since a want a value between 0 to the size of the object -1 (to access the index)
Then when I'm creating the issue I'm trying to use the applicationIndexFinal to access the desired index in the lookupObjects:
But this is the part that is not working, when I create the issue both the {{lookupObjects}}, the {{applicationIndex}} and {{applicationIndexFinal}} write values on the description, but not the {{lookupObjects.get(applicationIndexFinal)}}.
Example:
lookupObjects will write: Server1, Server2, Server3
applicationIndex will write: 2
applicationIndexFinal will write: 1
And then nothing more is written.
How can I use the applicationIndexFinal to access the value I want inside the lookupObjects?
Note: I'm writing in the description for testing purposes the value should then be inserted in the application field bellow.
I believe that get() for Lookup Objects takes a numeric parameter, so try converting with asNumber.
And...I think you can do the index calculation in one variable if you subtract after the CEILING() function in the math expression.
Thanks for your fast response, I've already tried this:
{{lookupObjects.get(applicationIndexFinal.asNumber)}}, but still nothing
It looks like you're new here. Sign in or register to get started.