Solved - Help needed - JQL - Code for end of quarter date in a field

mikael_stiglen January 10, 2025

Code worked. =) 

Hi Guys, 
I am really new to Jira and the management of it, slowly learning. 
Am a little bit stuck now, hoping someone can help me out. =)

Goal: Code that calculates end of each quarter as a date.

This is what i with the help of google found, but its not working and i dont know why :/

Q1: {{now.endOfMonth.withMonth(1).plusYears(1).plusMonths(2).format("yyyy-MM-dd")}}
Q2: {{now.endOfMonth.withMonth(1).plusYears(1).plusMonths(5).format("yyyy-MM-dd")}}
Q3: {{now.endOfMonth.withMonth(1).plusYears(1).plusMonths(8).format("yyyy-MM-dd")}}
Q4: {{now.endOfMonth.withMonth(1).plusYears(1).plusMonths(11).format("yyyy-MM-dd")}}

Do anyone know whats wrong ? :) 

1 answer

0 votes
Tomislav Tobijas _Koios_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 10, 2025

Hi @mikael_stiglen ,

Glad you managed to get it to work! 🙌

Would you mind sharing the resolution so it can maybe help others if they stumble upon this question/issue?

Cheers,
Tobi

mikael_stiglen January 16, 2025

Hi, 

Well, my code actually worked. 
So what i was trying to do was to autofill an field with quarterly dated "end date" in an automation, last day of each quarter.  

First when i tried it, it got really messy and the date 2001-01-01 was added. And i had no clue what the reason was and what was wrong in the code. Couple of days later i tried it again and it worked like  a charm. =)

Tomislav Tobijas _Koios_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 16, 2025

Hah, interesting. 👀

Not sure why or how, but I'm glad it worked in the end 😄

Cheers for sharing!

Like mikael_stiglen likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events