HelloCurrently have a Jira Automation message bot displaying filter data using issuesize and linked to filterMy question is would there be a way to prevent data from appearing if 0, e.g "No Epic Link" has 0 count above so stop it from showing when 0?Current string for "No Epic Link" <https://filterlink/issues/?jql=filter|*No Epic Link*: {{totalIssuesForTHmvpEpic|0}}>
Hi @alexanderlanden -- Welcome to the Atlassian Community!
Yes, that should be possible using the conditional logic functions for smart values. Just test if your value is not zero to proceed...or use a greater than test and check that for "true". Please look here for more information on conditional logic:
https://support.atlassian.com/cloud-automation/docs/jira-smart-values-conditional-logic/
Kind regards,Bill
Hi @Bill Sheboy Ive tried {{#if(and(totalIssuesForTHmvpAssignee.gt(0)))}} and{{#if(totalIssuesForTHmvpAssignee.gt(0))}} but it fails to display if >0.{{#if(and(totalIssuesForTHmvpAssignee.gt(0)))}}<https://.atlassian.net/issues/?jql=filter in ("34161") AND Status not in (Done) AND component in AND fixVersion = "20MVP" AND assignee is EMPTY|*No Assignee*: {{totalIssuesForTHmvpAssignee}}>{{/}}
What is your field type? I wonder if you need to convert first with asNumber before the test if the fields are text type...Conditional checks do not work with text fields, I believe.
For example you could try:
{{#if(issue.totalIssuesForTHmvpAssignee.asNumber.gt(0))}}Is greater than zero{{/}}
Please note that you use the {{#if... syntax when you want to return a value (e.g. in my example "Is greater than zero") and just {{if... when you just want a true/null result...without the pound symbol and trailing {{/}} to close the expression.
Hi Bill Still no luck im afraid.Tried {{#if(issue.totalIssuesForTHmvpAssignee.asNumber.gt(0))}}<https://.atlassian.net/issues/?jql=filter in ("34161") AND Status not in (Done) AND component in AND fixVersion = "MVP (~11th Mar)" AND assignee is EMPTY|*No Assignee*: {{totalIssuesForTHmvpAssignee}}>{{/}} and still it fails to appearAlso tried {{if.. but got null error
It looks like you're new here. Sign in or register to get started.