Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation rule for Auto populate whenever user update Due date filed it has to update the Quarter

Banti December 21, 2023

When ever user update the due date filed example Due date is  01/01/24 Quarter field will update as Q1. Like 01/01/25,01/01/26,01/01/27.
Thanks

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 21, 2023

Hi @Banti -- Welcome to the Atlassian Community!

What have you tried thus far to solve this scenario?

If you have started a rule, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected.  Those will provide context for the community to offer ideas.  Thanks!

If you have not started a rule, please look at the date / time formatting functions for rules, particularly format() as that includes an option to return the quarter of the year:

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/

Within that, it provides a link to the formats which can be used.

Kind regards,
Bill

Banti December 22, 2023

WhatsApp Image 2023-12-22 at 10.45.35 AM.jpeg

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 22, 2023

You may not need the condition if you use the format() function, as that can return a quarter, such as Q1, Q2, Q3, or Q4 for a specific date.  For example:

{{issue.duedate.format("qqq")}}

Please use a different format, based on the documentation, if that does not meet your needs.  (e.g., including the year with the quarter) 

Thiyagarajan Manickam
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 12, 2024

{{issue.duedate.format("qqq-yy”)}} 

For example, Date is 10th July 2024 - This smart value will provide Q3-24, but i want it as Q1 - 24...Let me know...Thanks

@Bill Sheboy : Can you please suggest...Many Thanks

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 13, 2024

Hi @Thiyagarajan Manickam -- Welcome to the Atlassian Community!

I am unclear what you are asking...

Do you mean you want spaces around the hyphen?  If so, please try this:

{{issue.duedate.format("qqq - yy")}} 

Kind regards,
Bill

Thiyagarajan Manickam
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 13, 2024

@Bill Sheboy : Thank you for the warm welcome. It is not about the space. Let me make it more detail: For example, If Due Date is 10th July 2024, this smart value will display as Q3-2024...right? Here, my requirement is instead of Q3(which is system defined and July month is in Q3), i need it as Q1-2024 (My Q1 starts from July). Hope it is clear.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 14, 2024

Yes, that helps: your quarters are shifted, such as for a financial planning year.

I do not believe there are built-in rule functions to change when the calendar year starts for quarters.

To do that for your scenario, you could use date functions to perform math, shifting the date, and then formatting as quarters.  https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/

One challenge will be managing the year part, as that will likely be incorrect for some of your quarters.  A possible solution is to use conditional logic to translate both the quarters and year, or just try subtracting the months for the shift:

{{issue.duedate.minusMonths(6).format("qqq-yy")}} 

Suggest an answer

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

Atlassian Community Events