Hello,
I’m struggling with an issue but unfortunately I can’t find some documentation on it. We have several custom cascading fields that needs to be filled by the agents; the fathers of these fields (the first choice of the cascading) have values YES and NO. We need to fill a comment with the name of these custom fields ({{issue.[Custom Field].name}}) only if the father have value YES. An example:
Desired comment: Field 1, Field 3
The desired comment must be sent via mail with automation for Jira, but that is not the hard part. The problem here is to obtain this “desired comment”.
Any tip is appreciate.
Thanks!
According to this post, you can do that with an advanced compare condition:
Here is the related information on the JSON fields to support this:
There is an open suggestion in the Code Barrel (automation) backlog to add support for directly accessing the cascading fields in the condition compare.
Best regards,
Bill
Hi @Gerardo Dalena,
Bill is correct, the way that you'll need to do this is via the advanced condition. This will allow you to use smart values to access the cascading field.
Cheers,
Simeon.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
thanks for all the tips.
The "desired comment" is made of all the fields that have YES as the parent. So, if I understand right, with 3 fields I have to create an if/else construct with all the possible outcome (YYY,YYN,YNY, etc). Is there a way to avoid this construct? It could be useful for larger group fields (es. 10 possibile fields with Y or N values).
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Probably yes, and perhaps not, depending upon the format/content you want in the comment...
Please identify an example issue with the values you care about in the field(s), and then use the method described here to learn what the smart value/JSON structure is:
https://support.atlassian.com/jira-software-cloud/docs/find-the-smart-value-for-a-field/
Then construct your comment to indicate all values, if they are indeed accessible this way.
@Simmo -- could that work?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ultimately, I think you need one of our backlog items https://codebarrel.atlassian.net/browse/AUT-1241 which would allow you to filter items out of a list. That might make things easier here.
However, I'm afraid that, yes, you'll need all the combinations. Or, a custom field.
If you had a field you could update then you can just check each field and, if it is yes, add it to the custom field so that you build up your value. That would only require 3 if statements then (separate if blocks though, not if / else if). You could also use entity properties and a refetch statement to achieve this as well.
Cheers,
Simeon.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Bill and Simeon,
thank you very much for your support.
Best regards,
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.