I know that I can use automation rules to assign an issue automatically using round-robin for example to a random person of a group. However, we have a custom field (User Picker: Single User) that we want to set to a random user of a group and then send a notification to that person.
So I basically need the same functionality when "assigning" a user to the custom field
Is this possible somehow? When I use automation rules to Update an issue field, I can only select a specific user but I can not choose from a group or list.
unfortunately you can't use the same UI from Assigning an Issue, but you could build something like this manually. I'm thinking along these lines:
{{#=}}RANDOM() * {{userlist.size}}{{/}}
What do you think about such a solution?
Cheers,
Matthias.
I also thought about setting it via the REST API. That was the only solution I came up with.
I don't recognize the scripting language you use in that expression - is there a way to execute this directly within the automation rules or do I have to go with the REST API route?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The syntax I used is a smart value. Smart values in Jira Automation can be used almost everywhere where you want to reference some content, apply conditions, or similar. Check out this documentation to lear about the different smart values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My idea with the REST API was that you could call the REST API via the Send web request automation action directly from your Automation rule. You could directly call the get users from group method to resolve the list of users for your group - and then apply the logic with the random number I described above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Another option using Jira automation (although a quick and dirty solution) is to store the current assignee in a variable, use the assign action to do the round-robin assignment, re-fetch the issue, and then edit the issue to copy the current assignee field to your custom user picker field and then set assignee back to the variable you stored earlier. Obviously not ideal since you will probably trigger some assignment notifications but it works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.