From Atlassian Support, this is the correct Smart Value:
{{issue.fields.project.projectCategory.name}}
Awesome! Thanks for sharing this!
Ste
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, @Joe
I hope that the smart value documentation will eventually centralize this information and align it with the REST API output.
__Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
can't get it to work, can anybody tell me how exactly this is supposed to be implemented in an automation?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually a simple microservice doing autocompletion would be awesome 😎
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the pointer, didn't use regex so far yet, and will be careful when i do!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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."
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.