Using 'Automation for Jira' version 7.3.3 and I'm trying to get the status color. According to the following article: https://blog.codebarrel.io/how-to-use-smart-values-in-automation-for-jira-15edddfb8c7c it says that we can get to any attribute following the JSON representation. So I used the JIRA REST API and was able to see that the statusColor is an attribute in the JSON but when I try and get it back using smart values, I don't get anything.
If I try the following: {{issue.status.statusCategory}}, I get back the following: StatusCategory{self='https://<jiraUrl>/rest/api/2/statuscategory/4', id=4, key='indeterminate', colorName='yellow', name='In Progress'}
I then tried the following: {{issue.status.statusCategory.colorName}} and don't get anything back. Not even an error. Is there a limit to the number of indirection that we can do in a smart value? Am I missing something?
Thanks for your help and time!
Luc
Hi @Luc
Full disclosure, I am using Cloud and not Server version of Jira...
What problem are you trying to solve by capturing the color? Or is this more a general question about the level of available dereferences in the smart values within automation?
For the symptom you observed, this behavior is a known issue and appears to be considered a "documentation problem": https://codebarrel.atlassian.net/browse/AUT-2065
With cloud automation rules, I noted:
So one work-around to try would be to save the value in a text custom field first, re-fetch, and then try to parse it as a string.
Best regards,
Bill
Thanks for the info @Bill Sheboy ! Unfortunately, the 'create variable' is only available in the Cloud version and not in the Server version so this option won't work.
The reason I need the status color is that I'm sending an email that contains an HTML table. I'm trying to set the background cell color based on the status color. I've gotten around it by doing 2 different rules but was curious as to why I couldn't get the value and save myself 2 rules.
Luc
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for explaining. How about this work-around: add a custom field like StatusColor, and set it (hard-coded) whenever an issue transitions. Then you can use the color in your HTML table when needed in other rules.
__Bill
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.