Forums

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

jql condition

Suma Pralhad Kustagi
Contributor
June 14, 2021

Hi,

   I have custom field and want to send the alerts when the expiry date is approaching..

How to achieve it..

Eg: Contract Expiry date

The date is approaching please take an action... Do we need to mention based on custom field and add in notification??

 

Regards,
Suma

2 answers

2 accepted

0 votes
Answer accepted
Callum Carlile _Automation Consultants_
Community Champion
June 15, 2021

Hi @Suma Pralhad Kustagi ,

What I would do is set up a rule with a scheduled trigger, which is set to run every day (e.g. if you use a CRON statement of 0 0 9 * * ?, the rule will run at 9am every day).

Within this scheduled trigger, you are able to add a JQL which will action all of the issues found as part of the schedule, so if you wanted to send the notification for all tasks which are within 7 days of the Contract Expiry Date field, you could use a JQL of:

"Contract Expiry Date" > startofday() and "Contract Expiry Date" <= startofday("+7d")

You can then use one of the notification actions within the rule, such as Slack, Teams or email.

Hope this helps!

Suma Pralhad Kustagi
Contributor
June 15, 2021

Hi Carlile,

     I want to set such a way that  they get notification when the expiry date is approaching..Like a month reminder or 15 days remaining etc..

Regards,

Suma

Callum Carlile _Automation Consultants_
Community Champion
June 15, 2021

Hi @Suma Pralhad Kustagi 

In that case, you can still use the scheduled trigger, but use the JQL of

"Contract Expiry Date" = startOfDay("+15d") - where the 15 is the number of days away from the Contract Expiry Date. You can of course set this to however many days you wish. The scheduled trigger will check every day for the tasks which are that many days away from the expiry date

Suma Pralhad Kustagi
Contributor
June 15, 2021

Hi Carlile,

    Thank you for the quick support. I also wanted to know like we need to add a trigger ,which conditional trigger to be used. Never used BitbucketStashFishEye or Crucible ..

 

Regards,
Suma

Callum Carlile _Automation Consultants_
Community Champion
June 15, 2021

@Suma Pralhad Kustagi Unfortunately there are no conditional triggers in the Automation feature (the Scheduled trigger is the closest you can get to this as you can add the JQL, however the rule will still trigger based on the set schedule).

I know with the ScriptRunner app you can add in conditions within the trigger, but this is a limitation of the Automation feature

Suma Pralhad Kustagi
Contributor
June 16, 2021

Thank you :)

Callum Carlile _Automation Consultants_
Community Champion
June 16, 2021

@Suma Pralhad Kustagi No worries! If you feel like this answered your question, feel free to hit the Accept Answer button, as it may help other community members who have a similar question :) 

0 votes
Answer accepted
Airbus Driver
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 15, 2021

Suggest an answer

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

Atlassian Community Events