Forums

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

Use an automation to change an assignee to unassigned back to the original assignee

Patrick Ricciardi
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.
April 8, 2020

Hi,

 

In an automation (the new built in automations, not the old ones.) I am attempting to set the Assignee to a ticket to unassigned. Immediately after that I am attempting to assign the ticket to the person it was originally assigned to.

 

I've tried to do this in 2 different ways.

1)

Used the Assigned Issue action and chose "Another Field Value or Comment" and "Previous Assignee".

Result:

Ticket stays as unassigned.

 

2)

Created a custom field called Current Assignee. Start the job by copying the Assignee filed into the Current Assignee field. End the job by assigning using a smart value that points to Current Assignee.

Result:

Assignee is whatever the Current Assignee field is before the automation starts. (eg. if it is empty, assignee is Unassigned, otherwise it is filled)

Current Assignee IS filled with the correct value after the automation is finished.

 

Any ideas on this?

 

Thanks.

 

pat

 

2 answers

1 accepted

0 votes
Answer accepted
Jack Brickey
Community Champion
April 8, 2020

Hi Patrick,

can you help me understand your actual goal here? Why would you take an issue that is assigned, mark it unassigned and then immediately assign it back to the same person. The reason I ask is that maybe there is a better way to achieve your actual goal? For example, let's say you are doing this to force a notification to the Assignee. In that scenario there would be a better solution. Regardless, if I better understand your goals I could offer up the best solution.

Patrick Ricciardi
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.
April 8, 2020

I just realized I put my reply as a reply to the question. I don't know if you get a notification when I do that.  Thanks for your help.

pat

Jack Brickey
Community Champion
April 8, 2020

Thanks Patrick. I might approach this different but that is neither here nor there really. In any event regarding your challenges with unassign/assign option 2 is the right approach but I think what is happening is that you are doing it all w/in a single automation. I think you need to set to unassigned and then have another automation assign, copying from the custom field.

Patrick Ricciardi
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.
April 8, 2020

Thanks! I'll try that next. That's a good idea.

 

If you have another method for accomplishing the task, feel free to share. I thought about using the scheduled automation, but, it wasn't as precise as I wanted.

 

pat

Jack Brickey
Community Champion
April 8, 2020

BTW, i would have to play with it but the way I might approach this problem is to have a "weeks of breach" custom field and a single SLA, e.g.

"weeks of breach" = none (initial default)

Automation 1 - SLA breaches:

  • send email A
  • set weeks of breach to A (refers to message A sent)

Automation 2 - SLA breached >= 1wk and not closed:

  • if weeks of breach = A
    • send email B
    • set weeks of breach to B
  • if weeks of breach = B
    • set weeks of breach to C
    • send email C
  • else
    • send email C

...and you might get fancier and actually keep a counter of weeks in breach - 0, 1, 2, 3, 4, etc. This might be useful for metrics assessment.

Patrick Ricciardi
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.
April 8, 2020

Thanks!

The problem I've found with this method is that Automation 2 only runs once when it is breached + 1 week. It won't run in breached + 2 weeks and so on. I haven't been able to find a method that allows the Automation to continuously run. That's why I created the loop in the way I did it.

There might be a method to do this that I have missed, though.

Patrick Ricciardi
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.
April 10, 2020

For anyone else who comes into this thread with a similar problem creating another automation to handle this worked. In fact, anything you change in an automation cannot be relied upon in that automation, you need to create another one to handle that change.

Here's what I ended up doing based on your great idea, Jack.

I set up one automation to handle Messages A, B, and, C. I created a custom field that incremented every time the automation ran. If it was empty Message A was put into a custom field, if it was equal to 1 Message B, and 1 or great Message C. When the counter is changed another automation is called. This automation resets the Assignee (therefore resetting the SLA). Sends the email. And comments on the ticket indicating an email was sent, and the body of the email.

 

Thanks for your help!

 

pat

0 votes
Patrick Ricciardi
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.
April 8, 2020

haha. I should have put that in there, but I didn't want to distract from the question.

We have a need to send out an email to users outside of Jira every week a ticket remains open. Week 1 is Message A. Week 2 is Message B. Every week after week 2 is Message C.

I created an SLA that breaches after 1 week.  This SLA starts on a transition change.

My automation sends out the email for the 1 week breach.

A second automation sends out an email for the breach +1 week and assigns the ticket to Unassigned, and back to an assignee.

I created a second SLA for the Message C. This one starts counting when the ticket is assigned from unassigned.

So the third automation runs when the Message C breach happens. It sends out the email with Message C, assigns the ticket to unassigned and then back to an assignee. Therefore continuing the loop.

 

pat

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events