I'm trying to format a text field they way Jira Tempo does in the field Original estimate ()
I have a smart value named billable that gives me the amount of seconds:
295800s --> 1w 5d 2h 10m
{{#=}}floor({{billable}} / (5 * 8 * 60 * 60)){{/}}w {{#=}}floor(({{billable}} % (5 * 8 * 60 * 60)) / (8 * 60 * 60)){{/}}d {{#=}}floor(({{billable}} % (8 * 60 * 60)) / (60 * 60)){{/}}h {{#=}}floor(({{billable}} % (60 * 60)) / 60){{/}}m
so that works fine.
The next step is to show only weeks, days and hours if the smart value is big enough. So therfore I try to use the .gte(x) or .gt(x) none of them seem to work:
"{{billable}}" --> "295800"
{{#if(billable.isNumeric())}}true{{/}} --> true
{{if(billable.gt(2), 1, 0)}} and {{if(billable.gt(2.0), 1, 0)}} --> 0
{{if(billable.lt(2), 1, 0)}} and {{if(billable.lt(2.0), 1, 0)}} --> 0
{{#if(billable.gte(2))}} 1 {{/}} --> empty