I am trying to create a weekly status report email that generates a series of lists with issue names and comments segmented by status. I have done it... save for the last part
In the last segment of the lists (the Closed section) I only want to display the items that have been closed in the last 10 days... while in all other sections it is OK to have items that have been open longer than 10 days.
Here is the syntax as it is... the bolded section is where I am having issue.
I can limit based on the status as closed... but I cannot add the second conditional statement.
HELP!
Syntax:
The Following Candidates have had status changes in the last week:
<b>Resumes In Review<b/>:
{{#Issues}}{{#if(equals(status.name, "In Review"))}}
<a href="{{issue.url}}">{{Summary}} - </a>{{Comment.last.body}}
{{/}}{{/}}
<b>Ready for Interview<b/>:
{{#Issues}}{{#if(equals(status.name, "Interviewing"))}}
<a href="{{issue.url}}">{{Summary}} - </a>{{Comment.last.body}}
{{/}}{{/}}
<b>Ready for C Interview<b/>:
{{#Issues}}{{#if(equals(status.name, "In C Review"))}}
<a href="{{issue.url}}">{{Summary}} - </a>{{Comment.last.body}}
{{/}}{{/}}
<b>Processing<b/>:
{{#Issues}}{{#if(equals(status.name, "In Process"))}}
<a href="{{issue.url}}">{{Summary}} - </a>{{Comment.last.body}}
{{/}}{{/}}
<b>Known Departure Pending<b/>:
{{#Issues}}{{#if(equals(status.name, "Offboarding"))}}
<a href="{{issue.url}}">{{Summary}} - </a>{{Comment.last.body}}
{{/}}{{/}}
<b>Removed from Staff Pipeline<b/>:
{{#Issues}}
{{#if(and(equals(status.name, "Closed"),
(updated,now.plusDays(-10))))}}
<a href="{{issue.url}}">{{Summary}} - </a>{{Comment.last.body}}
{{/}}{{/}}
Hi @Francisco Hazera -- Welcome to the Atlassian Community!
In your "closed" section, you do not have a condition which produces a true/false.
What test are you trying to perform for comparing updated and now.plusDays(-10)? Did you want to use greater than or equal to, gte()? Please try adding that to observe the results.
And also: in my experience, date/time comparisons like this with smart values need to be more specific. I recommend you consider using a specific format for both values to ensure they compare as you want, as an alphanumeric text string. For example, try formatting to jiraDateTime, and perhaps even converting to your own time zone to help with debugging.
Kind regards,
Bill
Thanks bill... running into this error with using the GTE function...
brand new to writing this automation code so any help would be greatly appreciated
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I believe your earlier expression was closer before...perhaps try this:
{{#Issues}}
{{#if(and(equals(status.name, "Closed"), gte(updated.jiraDateTime,now.minusDays(10).jiraDateTime)))}}
<a href="{{issue.url}}">{{Summary}} - </a>{{Comment.last.body}}
{{/}}{{/}}
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.