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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

What is the smart value for project category?

I'm trying to set up a jira automation rule based on project category.  Is there a smart value for this field?

5 answers

1 accepted

8 votes
Answer accepted

From Atlassian Support, this is the correct Smart Value:

 

{{issue.fields.project.projectCategory.name}}
Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 17, 2020

Awesome! Thanks for sharing this!

Ste

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.
Aug 18, 2020

Thanks, @Joe 

I hope that the smart value documentation will eventually centralize this information and align it with the REST API output.

__Bill

Like Josh Simnitt likes this

can't get it to work, can anybody tell me how exactly this is supposed to be implemented in an automation?

Ok seems to be because i'm coming from a release trigger.
if you are coming from a release the smart value is as follows:

{{version.project.projectCategory.name}}

Like Bill Sheboy likes 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.
Oct 08, 2021

Thanks, @Wim Matthijs 

I really wish there was a comprehensive smart value glossary: https://jira.atlassian.com/browse/JIRAAUTOSERVER-103

Rule writers waste lots of time hunting around for answers and the correct context to get at the information in Jira.

Kind regards,
Bill

Like # people like this

Totally agreed

Actually a simple microservice doing autocompletion would be awesome 😎

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.
Oct 11, 2021 • edited

Yes, lots of opportunities to improve the automation rule editor.  I'd like at least some syntax validation prior to save.  (another example: Watch out using RegEx in rules, as some invalid expressions lock up the rule editor when the engine attempts to parse them, preventing a save!)

Like # people like this

Thanks for the pointer, didn't use regex so far yet, and will be careful when i do!

EDIT: Text-based matches for these smart values may be case-sensitive for cloud automation rules that are triggered by create issue. If your rule recently started failing, it might be due to that, rather than a change to the smart value logic itself.

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.
Aug 09, 2022

Hi @Alis-Hathway Ward (DO NOT USE) 

I just retested this one and it works for Jira Cloud when the context is an issue and the project has an assigned Project Category.  Otherwise it returns null.

{{issue.project.projectCategory.name}}

Kind regards,
Bill

Very strange. It's certainly not working for me. Is there something super obvious to you that I'm not seeing wrong with my rule? I'm the site admin, so I can confirm with 100% surety that my category drop down includes choices for both hybrid and native and that the option is selected in the project config. 


Audit:
IF BLOCK
The following issues did not match the condition:
 IF/ELSE BLOCK
The following issues did not match the condition:


When: Issue created
Rule is run when an issue is created.
If: matches
{{issue.project.projectCategory.name}} contains hybrid

Then: Edit issue fields
Components
Add component

Else-if: matches
{{issue.project.projectCategory.name}} contains native

Then: Edit issue fields
Components
Add component

I was able to get it working when I inspected the drop down list and passed instead {{issue.project.projectCategory.id}}.

I don't know why that works and not name, but I will take it. My guess is case-sensitivity, which I've noticed JIRA has lately cared about for certain query params.

Thanks, Bill, for the help.

Like Bill Sheboy likes 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.
Aug 09, 2022

I am glad to learn you got that to work.  

One more thing to try if you still want the name attribute: The Issue Created trigger can start the rule before all of the data is available.  This is a known timing issues for Jira Cloud.

The work-around is to add a Re-fetch action immediately after the trigger.  This will slow down the rule and reload the issue data before trying to use it.

1 vote
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.
Aug 17, 2020

Hi @Joe 

Please try the guidance below to find an unlisted/undocumented smart value, using the REST API to capture an example issue:

https://support.atlassian.com/jira-software-cloud/docs/find-the-smart-value-for-a-field/

Note that if this does not provide an exact match, it may get you close enough to experiment and find the name.

Best regards,

Bill

0 votes
Celina Kincaid
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Jan 17, 2024

I could never get {{issue.project.projectCategory.name{}}} to work either.  Used correct case, tried in quotes, without quotes, stood on my head, etc.

I gave up and did {{issue.project.projectCategory.id}}.  It's now working.

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.
Jan 17, 2024

Hi @Celina Kincaid -- Welcome to the Atlassian Community!

If you did try this:

{{issue.project.projectCategory.name{}}}

The reason that did not work is the extra curly brackets after name.  Please try this instead:

{{issue.project.projectCategory.name}}

Kind regards,
Bill

Any update on this one?

I have tried LOTS of different iterations and can't get anything to pull back the Project Category.

YES {{project.name}}
NO {{project.projectCategory.name}}
NO {{project.projectCategory}}
NO {{project.projectCategory()}}
NO {{project.projectCategory.name()}}
YES {{issue.project.name}}
NO {{issue.project.projectCategory()}}
NO {{issue.project.projectCategory.name()}}
NO {{issue.project.projectCategory}}
NO {{issue.project.projectCategory.name}}

NO {{issue.fields.project.projectCategory.name()}}

NO {{issue.category}}
NO {{issue.category.name}}
NO {{issue.category.name()}}
NO {{issue.project.projectCategory.id}}

Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Dec 26, 2022

Hi @Amy McCann 

I just tried...

{{issue.fields.project.projectCategory.name}}

...and it works for me.

Assuming you've checked the Project has a Project Category, could you give us the full rule details so we can try to replicate your issue?

Ste 

0 votes
Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 16, 2020

Hi @Joe 

I envision it's something like {{project.category}} if it exists - or perhaps {{issue.project.category}}?

How are you looking to utilise the category? If you provide more specifics about the rule, it'll help us find a solution to your overall need :)

Ste

I've tried both of those and neither of them work.

I'm not looking for advice on how to come up with a solution to my problem.  I'm just asking a simple question:

Is there a smart value for the project category field?

For context, the JQL syntax for this field is "category."

Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Aug 16, 2020 • edited

Hi @Joe 

If isn't working with the options I suggested above - I tried them also in a test instance - it might not be available.

{{issue.project.XXX}} is how you access an issue's project information via smart values.

I know this is Server documentation, but this page on Smart Values doesn't mention it under the "issue.project" section.

Ste

{{issue.project.category}} didn't work either.

Suggest an answer

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

Atlassian Community Events