Hello
Currently have a Jira Automation message bot displaying filter data using issuesize and linked to filter
My 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%20in%20(%2234161%22)%20AND%20Status%20not%20in%20(Done)%20AND%20component%20in%20AND%20fixVersion%20%3D%20%2220MVP%22%20AND%20assignee%20is%20EMPTY|*No Assignee*: {{totalIssuesForTHmvpAssignee}}>{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill
Still no luck im afraid.
Tried {{#if(issue.totalIssuesForTHmvpAssignee.asNumber.gt(0))}}<https://.atlassian.net/issues/?jql=filter%20in%20(%2234161%22)%20AND%20Status%20not%20in%20(Done)%20AND%20component%20in%20AND%20fixVersion%20%3D%20%22MVP%20(~11th%20Mar)%22%20AND%20assignee%20is%20EMPTY|*No Assignee*: {{totalIssuesForTHmvpAssignee}}>{{/}} and still it fails to appear
Also tried {{if.. but got null error
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @alexanderlanden
First, how/when is that field you are testing in the issue populated? Are you certain it contains a numeric value when tested? If you try writing it to the audit log, what does it show?
Next, would you please post images of your complete rule and of the audit log details for when the rule doesn't work as you expect? That may provide some context for what is happening.
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill
Sorry for the late reply
ended up with just displaying "0"
Thank you for the assistance on this.
I have a new question will post shortly.
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.