Forums

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

custom mail based on time in status

Søren Hansen April 26, 2023 edited

Hello everyone.

I want to use scriptrunner to send my customers a custom email. Here I use one of the built-in ScriptRunner workflow functions. I already use it when an issue hits a certain transition in the workflow.

But I would also like to use it when an issue has been in a status for more than 72 hours.

Can i make a GroovyScript in the box "Condition and Configuration" that checks for this.

Example: We have a status called "Quotation at customer", this status is used when a quotation has been sent to the customer. When 72 hours have passed, the system must send a reminder to the customer.

As mentioned, we already use scriptrunner to send custom emails to our customers during workflow transition.

 

3 answers

1 vote
Valeriia_Havrylenko_SaaSJet
Atlassian Partner
April 26, 2023 edited

Hello  @Søren Hansen 

If you are OK to use third party app, for custom emails i suggest you to try Time between Statuses, developed by my company SaaSJet.

In our add-on you will be able to set the Warning and Critical time limits exactly for notify people about issue. 

 Ð—німок екрана 2023-04-26 о 15.21.14.png
Our add-on is free up to 10 users. Also i'm offering to you a 30-day trial

Please, let me know if you have any questions

Hope it helps,
Valeriia

0 votes
Ram Kumar Aravindakshan _Adaptavist_
Community Champion
April 26, 2023

Hi @Søren Hansen

For your requirement, it would be best to refer to the example available in the Adaptavist Library, i.e. https://library.adaptavist.com/entity/count-the-time-an-issue-was-in-a-particular-status.

The sample above counts exactly how long an issue was in a particular status.

You will basically need to amend the condition to check if the time exceeds 72 hours and add a mail notification.

For the mail notification example, you can refer to this example, i.e. https://library.adaptavist.com/entity/basics-send-email

Please ensure that you upgrade your ScriptRunner plugin to the latest release so you can use the new HAPI feature.

I hope this helps to answer your question. :-)

Thank you and Kind regards,

Ram

0 votes
Radek Dostál
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.
April 26, 2023 edited

Not in the workflow, since the descriptor is only read/triggered during a transition and no other time.

 

Typically for this you would need an "escalation service": https://docs.adaptavist.com/sr4js/latest/features/jobs/built-in-jobs/escalation-services#

 

Which based on interval and jql, you can then do a similar thing as you did in the post-function to send an email.

Alternatively - and probably better because you wouldn't need to maintain groovy code - you could also do this with Automation for Jira, it has a "Scheduled" when-trigger, which is the same thing, and you can decorate the mail in webUI editor, not needing to code it altogether. You do need the "pro" edition for this though I believe, which is bundled with data center.

Søren Hansen April 26, 2023

Not sure what action to pick. 

I have the JQL Query, but i am unsure on the "Action" and the "Additional issue actions". You mention the  post-function to send an email?

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, jira product discovery, jpd premium, product management, idea management, product discovery, jira premium, product planning, atlassian community, product development, roadmap planning, product prioritization, feature management

Introducing Jira Product Discovery Premium ✨

Jira Product Discovery Premium is now available! Get more visibility, control, and support to build products at scale.

Learn more
AUG Leaders

Atlassian Community Events