We have an automation that sends certain details when an issue is created to relevant users.
One of these fields is a custom date/time field, however they don't always know this date when creating the ticket. In that scenario, the email just has a blank value.
Is there a way to show something like "TBD" if the field is left blank?
Thank you!
Edit: I know I can do an if/else rule with the field as a condition for which email gets sent, but I would prefer the smart value route if it's possible.
Hello @Ashley Honeycutt
Below is how I use it in my emails:
{{#if(equals(customfield_11700.value, NULL))}} <b style ="color:red;"> TBD </b> {{/}} {{#if(not(equals(customfield_11700.value, NULL)))}} {{customfield_11700.value}} {{/}}
You can replace "customfield_11700.value" in above with smart value which gives you this date.. Hope it helps.
Did you confirm that expression works for a date field type for Server / Data Center? I know the null handling tests can vary by field type and whether or not the field was previously cleared...at least for Jira Cloud automation that is the case.
Thanks!
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy
Just tested against Due Date field and NULL evaluation worked.. Hopefully will work for @Ashley Honeycutt as well.
Ashley, please replace your date field with "Due date" in below syntax and share if its working. Thanks!
{{#if(equals(Due date, NULL))}} <b style ="color:red;"> TBD </b> {{/}} {{#if(not(equals(Due date, NULL)))}} {{Due date}} {{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you, @Kalyan Sattaluri
I feel like this approach is getting me closer to what I'm looking for, although for some reason I'm receiving "TBD" even if the date/time custom field has a value in it.
I'll keep tinkering with it, but if anybody knows in the meantime what I may be missing, I'm all ears.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please share the syntax you are using so we can review.
Also, instead of trying it out in email, replicate the rule I have above, so log the values like I have, trigger it with value present in the field and value removed and share audit log.
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.