Automation rule to assign Assignee based on field Category
Asked by Polina Pylara:

Hi

I am looking to write automation rules to automate the correct Assignee based on the field Category.   

Example Category would be A or B and the rule should be

If Category = A Assign to George

If Category = B Assign to Helen

When I get to the "Issues fields Condition" and choose Category the drop down does not show the Categories I have set up in my board

Below are the Categories set on the Jira Board

![Screenshot 2024-05-16 at 21.00.19.png](https://community.atlassian.com/t5/image/serverpage/image-id/324289iBC6DF716A7B8202D/image-size/large?v=v2&px=999 "Screenshot 2024-05-16 at 21.00.19.png")  

Below is what comes up in the automation rules, which is not what I use as Category in my Jira tickets and I do not see an option to add text manually

![Screenshot 2024-05-16 at 21.01.13.png](https://community.atlassian.com/t5/image/serverpage/image-id/324291i30DC34D15B7C353F/image-size/large?v=v2&px=999 "Screenshot 2024-05-16 at 21.01.13.png")

Screenshots are from Project Jira Board


Answers:
author: Michel Neeser
body: Hi [@Polina Pylara](/t5/user/viewprofilepage/user-id/5499314) and welcome!

As far as I know, the "Category" field available on the list view in business projects can't be used in an automation rule (yet). The values you see in your second screenshot are probably from a different "Category" custom field, which may have been added by a Jira administrator.

Hope this helps!

comments: author: Bill Sheboy
body: Hi [@Polina Pylara](/t5/user/viewprofilepage/user-id/5499314) -- Welcome to the Atlassian Community!

Yes, and...to Michel's answer:

For Jira Work Management projects, the Category field is not listed in automation dropdown fields yet: <https://jira.atlassian.com/browse/AUTO-803>

As a workaround, you may use a smart value condition and the custom field id for it. For example, with a made-up custom field id:

* smart value condition:
  * first value: {{issue.customfield_12345.value}}
  * condition: equals
  * second value: PARTNER

To find the correct custom field id in your Jira project, please use this how-to article: <https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/>

Please note that comparison is case-sensitive, so confirm your values match your defined values in case.

As another idea for your scenario, you could use a [Lookup Table](https://community.atlassian.com/t5/Automation-articles/Update-Create-lookup-table-action-improvements/ba-p/2427798) to map the Category values to the assignee account id values, eliminating the need for a long list of if / else conditions. That would make the assignment look like this, assuming the table was named *varCategoryToAssignee*:

{{varCategoryToAssignee.get(issue.customfield_12345.value)}}

Kind regards,  
Bill


author: Polina Pylara
body: Hi,  

Thank you, in regards to the table name, since it does not accepts non alphabetic characters how would that work?

Key I have inputted the value Category (11018) would have "INTERNATIONAL"

Value is the AssigneeID  

![Screenshot 2024-05-17 at 18.48.56.png](https://community.atlassian.com/t5/image/serverpage/image-id/324550i27622BE97F09333C/image-size/large?v=v2&px=999 "Screenshot 2024-05-17 at 18.48.56.png")


author: Michel Neeser
body: [@Polina Pylara](/t5/user/viewprofilepage/user-id/5499314) The "Lookup table variable name" is just the name of the variable you're using later when looking up the table. So, your action should look like this:

![SCR-20240517-sjdj.png](https://community.atlassian.com/t5/image/serverpage/image-id/324572iA87DA681C152F9BD/image-size/large?v=v2&px=999 "SCR-20240517-sjdj.png")

And then you can use the expression [@Bill Sheboy](/t5/user/viewprofilepage/user-id/1685313) mentioned to set the assignee:

![SCR-20240517-skge.png](https://community.atlassian.com/t5/image/serverpage/image-id/324574i33C14EF58AE4A0A1/image-size/large?v=v2&px=999 "SCR-20240517-skge.png")