Forums

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

Jira automation that checks a date to set reminders yearly.

Deleted user November 22, 2021

I have a "Contract Signed Date" (month/day/year) and I want the automation to tigger every year on that month/day so I can review the contract yearly, how would I go about comparing the current month/day to the month/day of the "Contract Signed Date"? 

3 answers

1 vote
Deleted user November 22, 2021

Thanks for the welcome and quick response @Alex and @Bill Sheboy

The trouble I am having is the contract signed date may not change for a few years, so every year I need to review. For example if the contract signed date is Jan 1, 2019, I want to trigger for Jan 1, 2022, Jan 1, 2023, Jan 1, 2024 etc. 

After a quick test, I think this might work: 

Screenshot 2021-11-22 162110.jpg

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.
November 23, 2021

Hi @[deleted] 

If this rule works for you, I recommend using it; simple is better for a need like this.  When I see use cases like this for a multi-year need, I ponder what Automation for Jira will even look like in 5 years, so making this overly complex may not be maintainable.

One other thing to watch for, as this is for contract reviews: When there is a Jira automation outage, information from the Atlassian support team indicates:

  • scheduled rules which miss their scheduled time (during the outage) could be skipped,
  • could run back-to-back and catch up, or
  • may not run at all.

That is depending upon the specifics of the outage.  Please consider how to manage a rule not running when you expect so you get the alerts you need.

Kind regards,
Bill

Deleted user November 23, 2021

@Bill Sheboy Thanks for the advice, that is something I'll keep in mind and see how I can tweak this to make sure I am not missing contracts when they come due for review. 

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.
November 23, 2021

An idea to help: adjust for reviews that should happen during the upcoming week, giving you a window of time to respond.  Use .format() to compare if the contract signed date (adjusted to this year) has a week matching the current week.

Like Deleted user likes this
1 vote
Alex
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.
November 22, 2021

Hi @[deleted] and welcome to the community!

 

Perhaps a rule scheduled to run every day and performing a JQL search could help you with that:

rule.png

This scheduled rule will run every day and check whether the Contract Signature Date is older than 365 days. I am assuming the Contract Signature Date custom field is a date. You can also review the JQL or schedule to suit your use case.

I hope it helps. If this answer helps solve the problem, please come back and mark this answer as solved to help other community members with the same challenge. If not, you are welcome to share your solution as well.

Cheers,

Alex

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.
November 22, 2021

Hi @[deleted] -- Welcome to the Atlassian Community!

You could do this in a couple of ways with a scheduled trigger: JQL date test or with a generic scheduled trigger and condition test

  • JQL: run your trigger every day, and use JQL to test around your custom field date, such as -365d to -358d (to create a week span)
  • Condition test: run your trigger every day, and use the date/time functions to compare your custom field to {{now}} with the diff() function.

Note to watch for testing too narrow of a range and not scheduling only on business days, as contract signed date last year may have been a working day but is a weekend this year.

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events