Hi all
I've scoured the source material and google - it's been several hours and I can't get this to work.
I want to automatically set the start and due date to the beginning and end of a quarter based on the summary string.
For example, "Q3 Reviews" would set the start date for July 1st and end date for Sept 30th.
The IF condition is working fine, but my code is failing to update the start and due date. The audit log states the rules ran successfully and edited the issue.
Start date:
{{#switch}}{{issue.summary.<span>match</span>(<span>'Q1'</span>) ? now.<span>format</span>(<span>'YYYY'</span>) + <span>'-03-31'</span>}}{{issue.summary.<span>match</span>(<span>'Q2'</span>) ? now.<span>format</span>(<span>'YYYY'</span>) + <span>'-06-30'</span>}}{{issue.summary.<span>match</span>(<span>'Q3'</span>) ? now.<span>format</span>(<span>'YYYY'</span>) + <span>'-09-30'</span>}}{{issue.summary.<span>match</span>(<span>'Q4'</span>) ? now.<span>format</span>(<span>'YYYY'</span>) + <span>'-12-31'</span>}}{{/switch}}Due Date:
{{#switch}}{{issue.summary.match('Q1') ? now.format('YYYY') + '-06-30'}}{{issue.summary.match('Q2') ? now.format('YYYY') + '-09-30'}}{{issue.summary.match('Q3') ? now.format('YYYY') + '-12-31'}}{{issue.summary.match('Q4') ? (now.format('YYYY') + 1) + '-03-31'}}{{/switch}}
I have also tried using wildcards e.g. "issue.summary.match('Q1.*')"
Can anyone point me in the right direction?