Hi Everyone!
I had what I thought was a simple problem - A team that has quarterly tasks that they wanted the work item(issue) summary to state last quarter and year when created to make searching easier and clearer when items get left open and when looking for historical data. (example: Task A Q4 2025 would be created January 1 2026)
We automate tasks using the schedule option every 3 months (the first day of the next quarter)
However, I learned that jira automation can't use If Else statements AND Jira doesn't recognize .quarter AND the summary field has a text limit of 255 characters and it counts your smart statements not the output of said smart statements.
Here is the formula I made that works:
Q{{#if(now.minusMonths(3).monthOfYear.lte(3))}}1{{/}}{{#if(now.minusMonths(3).monthOfYear.lte(6))}}2{{/}}{{#if(now.minusMonths(3).monthOfYear.lte(9))}}3{{/}}{{#if(now.minusMonths(3).monthOfYear.gte(10))}}4{{/}} {{now.minusMonths(3).year}}
Now I know what you are thinking... if you had month 5 it would in theory display Q12 but for some reason it doesn't. I'm going with it. 🫠
I ran into a couple tasks that have longer titles (around 20 characters not a lot) and I can't get them shortened anymore without them starting to resemble a cat crossing my keyboard rather than something I intentionally typed that makes sense.
Anyone have any ideas of a better solution for this or cleaner code?