I've successfully created a JIRA rule to send an email notification based on a JQL query. I then applied #IF statement in the email notification to filter by specific fields. During testing I found filtering via #IF only works on core fields, not custom fields.
Below is the script I use. I'm able to filer by status.name, but that same functionality does not apply to issue.customfield_16276.value. I'm looking for a solution to the filtering issue or a workaround to generate the same result. The custom field in this scenario is used in the JQL query just as an FYI. Thoughts?
Development --- this works
{{#lookupIssues}}
{{#if(status.name.startsWith("Development"))}}
<a href="{{url}}">{{key}}</a> {{summary}}
{{/}}
{{/}}
Done --- this works
{{#lookupIssues}}
{{#if(status.name.startsWith("Done"))}}
<a href="{{url}}">{{key}}</a> {{summary}}
{{/}}
{{/}}
Test Alert --- this does not work
{{#lookupIssues}}
{{#if(issue.customfield_16276.value.startsWith("Amber"))}}
<a href="{{url}}">{{key}}</a> {{summary}}
{{/}}
{{/}}
