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

[Jira Automation] Set assignee as a watcher upon ticket creation

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 4, 2021

Hi all!

I'm trying to set the assignee of a ticket as a watcher. I've already read inside this community a lot of stuff that could potentially solve my problem (e.g. here). The easiest way to do it is by using smart values. However a lot of smart values that I've used do not work. So here's the situation:

  1. I've created an automation rule
  2. I'm assigning the ticket to a member within a project role
  3. I'm trying to add as a watcher the assignee using the following smart values
    1. {{assignee.key}} <- this is recommended on the Add Watcher automation action
    2. {{assignee.accountId}}
    3. {{assignee}}
    4. {{assignee.displayName}}
    5. {{issue.assignee.accountId}}

I've tried to log all the above, but nothing returns a value. Everything is null. And I can confirm that the ticket assignment works and it is assigned from this automation rule, and not from any post function, or from the project settings.

But nothing happens. I can confirm that if I add {{reporter.accountId}} to the add watcher action, then it works fine!

Any thoughts?

 

Cheers,

Alex

1 answer

1 accepted

1 vote
Answer accepted
Alexis Robert
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 4, 2021

Hi @Alex Koxaras _Relational_ , 

 

I've just tried it on my test isntance and it looks like it works fine with {{issue.assignee}} as you can see :

 

Screenshot 2021-02-04 at 12.41.28.png

 

I'm not sure if you're describing the same scenario : are you also using the Automation Rule to set the Assignee ?

 

Let me know if this helps, 

 

--Alexis

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 4, 2021

Hi Alexis!

Thank you for your swift reply. Unfortunately, mine doesn't work. As you can see, I assign the user in the prior step before adding him as a watcher. I can confirm that whenever I create a ticket the first IF statement is activated.

My user has all roles assigned to him within the project (in this instance as an IT manager) and has all the necessary permission to be assigned to the project (I'm eligible to assign him the issue from the "reporter" account id).

New Project (1).jpg

Alexis Robert
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 4, 2021

Hi @Alex Koxaras _Relational_ ,

 

I have tried again and you're right : it won't work if you have an action to Assign the issue and then use that value for the watcher.

I've how to fix this : you need to add "Re-fetch issue data" between the "Assign" and "Add watcher" steps : 

 

Screenshot 2021-02-04 at 13.34.04.png

 

This way works for me at least.

 

Thanks,

 

--Alexis

Like Jack Brickey likes this
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 4, 2021

Yep this is a know limitation and the refetch is the solution. Or you can break the rule into two rules.

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 4, 2021

Hi Alexis!

That did the trick! The force is strong with you (Adam Driver got me laughing so hard)!

Thank you for trying solving this problem. When you actually select the re-fetch data, it actually stated when this should be used.

Insightful!

 

Cheers,

Alex

Suggest an answer

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

Atlassian Community Events