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

Automating round robin assignment for different shifts in Jira Server Automation

Rabbit Stoddard December 3, 2020

I am using the Automation plugin for jira server in jira Service Management for this. I have three shifts of service desk workers, and I want to do round robin assignments for each shift. My requirements are thus: 

 

  • shift 1 is 8 AM-5 PM
  • shift 2 is 11AM-8 PM
  • shift 3 is 12AM - 9 AM
  • the project lead needs to be able to change people between shifts without contacting the admin (me). 

The problem is that between the hours of 11 AM and 5 PM, I have two different shifts working. I was intending to use roles to do the assignment, but you can't specify two roles in a round robin. 

What I tried next was setting an entity property on the project for Last Assignee, with a value of either 1 or 2 for whichever of the two overlapping shits was assigned, and then using if/else to switch up assignment, as follows:projectProp.png

 

Now, my notation could well be off (I also tried project.properties.myProperty), but it looks like while Automation can set properties all day long, https://codebarrel.atlassian.net/browse/AUT-83 indicates that it can't actually read them, except for issue properties. Which aren't useful in this case, because I need to know what role for the assignee in the /last/ created ticket in order to set the next one. It would be much simpler if I could just specify two roles, otherwise I'll have to create yet another role for the overlap period, add everyone in both to it, and then it will show on all projects, even where it isn't relevant. 

Anyone have thoughts on this?

 

 

 

2 answers

0 votes
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 12, 2021

So @Rodney Nissen - ReleaseTEAM posed a question about this in the Innovalog "Stump The Expert Challenge", but for the life of me, I can't figure out how to use JMWE to do it. (Sorry Innovalog.)

The challenge is "Round-robin issues based on time zones" - sound familiar?

But he also recently posted "Give Me A Break", a tutorial on how to create a project/workflow + automation that will allow users to remove themselves from a Service Agent role when they are on vacation (and also bulk-assigning their tickets to whoever is covering for them).

Anyways, thinking about the challenge, I found your question again and am sure Automation is the way to go for this, but as to your last requirement, I think Rodney's tutorial kind of nails it.

Having a project/workflow that uses the Automation Web Requests to hit the JIRA API to add/remove users from the rotation groups would allow for "self-service" for the project lead.

---

And oooof. Now that I reread your original question, it doesn't even look like having the project lead be able to manage the groups was the issue. It was the whole double-shift thing. Whoops. Did you ever figure that out?

Rodney Nissen - ReleaseTEAM
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 13, 2021

To be fair, we did call that challenge a "mind-bender"

Rabbit Stoddard October 21, 2022

They wound up not needing it anymore, so I was able to not have the overlap group. Which solved it for me in the broad, but it'd be worthwhile to figure it out just as an exercise.

0 votes
Darryl Lee
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 3, 2020

Are you wrapping project.properties.myProperty in curly braces?

It's a smart value, so you'll need to do: {{project.properties.myProperty}} to check it.

Rabbit Stoddard December 3, 2020

Yes. This is what it looks like in the editor: 

log value.pngScreenshot 2020-12-03 152923.png

 

and I tried this in both the {{projectProperty.lastAssignee}} and above formats, with the same result. If the format is still again something different... well, that could very well be so.

Darryl Lee
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 3, 2020

OH! I forgot the quotes. For some bizarre and undocumented reason, you have to put Property names in quotes:

Try this: {{project.properties."lastAssignee"}}

I got this tip from @William Sheboy

https://community.atlassian.com/t5/Jira-Core-questions/How-do-I-access-a-User-entity-s-properties-set-via-API/qaq-p/92490#M51725

Like # people like this
Bill Sheboy
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 4, 2020

Yup, it looks like project properties can now be read from the automation rules.

Here's an unrelated tip if you try to organize your entity properties better (such as with a namespace organization): the key cannot always contain a period.  It definitely doesn't work for project entity properties, and I have seen some posts that it does work for issue entity properties.  Curious...  I submitted a defect for this to learn if this is just a documentation gap versus a defect.

__Bill

Like Rabbit Stoddard likes this
Rabbit Stoddard December 4, 2020

Do you have to use the quotes when you set the property as well, on this screen? 

setProperty.png

Bill Sheboy
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 4, 2020

No, you just set the property with no quotes around the key.

If you are wondering if there is an issue even setting the property, you may also just do a quick check in a browser using the REST API to grab the values:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-properties/#api-rest-api-3-project-projectidorkey-properties-propertykey-get

 

Like # people like this
Rabbit Stoddard December 11, 2020

I haven't got this working yet, but I am pretty sure it's something I'm doing wrong on my side. I was able to confirm that the property isn't actually getting set with the API call, so I'll start there.

Bill Sheboy
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 11, 2020

@Rabbit Stoddard if you post your current rule maybe the community will see something to help.

__Bill

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events