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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Automation for JIRA - can I assign issue to component lead if it's unassigned?

Hey, 

 

I'm trying to create a rule that assigns issue to it's component lead ONLY if it's unassigned. I know I can auto-assign to component lead from the projects settings. But I want to do so only if the issue is currently unassigned. Tried to find a smart value but no success there. 

 

Thanks

Nofar

3 answers

2 votes

Hi @Nofar Ben Kereth

During creation, this is how the component lead works - it defaults to the component lead unless a specific user is selected.

I think I've worked out a way during edits - it does require a little setup:

  • Ensure each required component has a component lead
  • Ensure the default assignee is the component lead for each of those

^ Once done, create an automation rule and then:

  1. Set a Trigger - for example, Field Value Changes > Assignee
  2. Set a Condition, specifically a User Condition. You want it to check Assignee and that user is empty / unassigned
  3. Set an Action, specifically Assign Issue - select the option "Automatic"

This should default unassigned issues to the Automatic assignee - in this case, the Component Lead. 

You can use another Trigger if you prefer, such as any time the issue is edited or transitioned. This was just the one I used for this test.

Ste

Hi,

A little workaround to be done to avoid any trigger.

First, the whole system to be disabled to unassigned issues.

System --> General Configuration --> Allow unassigned issues --> OFF

To enable this in System, you need to make sure no unassigned issues.

 

At project level, you are anyhow setting default Assignee as Project Lead. If component is selected, then Component Lead.

 

For any of the issue created, it will be assigned to ASSIGNEE or Component Lead or Project lead.

 

Hope this works without adding any triggers.

 

Regards.

0 votes

Hi @Nofar Ben Kereth

 

first, you should check if the field "assignee" is empty with a condition component.

Getting component leads is a bit more difficult. You can call the Jira API to get the component lead (documentation). I found this tutorial quite helpful to follow for basic setup, which makes it quite easy.

 

I think you should get the component lead accountId then via the webhook response like this:

{{webhookResponse.body.lead.accountId}}

 

Which you can use in the automation component "assign issue" in which you select "smart value" any copy paste the above smart value in.

 

And you can upvote the feature request in the meanwhile: https://jira.atlassian.com/browse/JRACLOUD-76851

 

Yours
Jan

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

⏰ Day in the life of a Jira Admin!

Hello Community! We thoroughly enjoyed this just-for-fun conversation in the Jira Admin Group about what it's like to be a Jira Admin. For #JiraJuly, our talented designers created these graphics t...

576 views 2 18
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you