SOS!! I've tried everything under the sun to get this to work to no avail.
I have a beautifully crafted email that sends to the approver with all the fields from the completed form so they can approve from the email without going into the Jira Portal. Green tick, amazing, the crowd goes wild.
I'd like to take this a step further by hiding lines from the table when they are blank/empty (not required for this particular request). Some custom fields are simple text, date, checkbox, dropdown single select.
I tried to add the code line {{#if issue.customfield_10247}} but this ends up hiding the line regardless of whether there is a value in it or not.
Here is an example of one of my tables. For example the requestor may only need flights and accommodation but not car hire. So the car hire field would be empty and would like to hide:
Thanks
Can you try with exists?
e.g. if customfield_10272 does not have a value, then content inside if block won't be printed.
{{#if(exists(triggerIssue.customfield_10272))}}
Value: {{triggerIssue.key}} {{triggerIssue.customfield_10272}}
{{/}}
Let me know if this works for you.
It didn't work - the line was missing even when the field had a value....but even more interestingly, it hide the text when I had the wrong custom field mentioned.
I copied and pasted from your response but didn't update to the appropriate field to what I needed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually, I updated to my custom field ID and it works! Your amazing thank you so much!
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.