Reopen a ticket, but only within 7 days

Phil Buckley January 25, 2023

Hi,

We have automation in place for 'Rule is run when a new comment is added to an issue.' to re-open tickets.

However, we don't want tickets re-opening if the ticket was closed over more than 7 days. ago. Instead, we want a new ticket to be created.

 

Is this possible?

 

Many thanks in advance

Phil Buckley 

2 answers

2 accepted

2 votes
Answer accepted
Jack Brickey
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 25, 2023

add a condition JQL - resolutiondate >= -7d

this will allow the rule to continue if the issue was resolved within the last 7 days

Phil Buckley January 26, 2023

Hi Jack and many thanks for the JQL line.

 

I've added and tested this successfully. Any ideas on how best to create a new ticket if the comment is older than 7 days?

 

Kind regards,

Phil Buckley

Jack Brickey
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 26, 2023

Sure. I would use if/else Condition.

If condition uses the JQL above and the action is to reopen. The else action is to use Create new issue.

it should be pretty straightforward when you start to play with it. However, if you run into any difficulties at all, just let me know and I can try to throw together an automation example.

Phil Buckley January 27, 2023

Thanks Jack,

I put an If and an Else-if in place to Clone an issue, it looked to work ok however now when closing a ticket it re-opens. I guess the first rule is causing this. 
What should I change the first step to be?

Many thanks again
Phil

Automation.JPG

Jack Brickey
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 27, 2023

Ok so you are missing one key condition that is at heart of your goal...

"Rule is run when a new comment is added to an issue."

I am assuming that you actually only want to execute the actions if it is a comment by a customer, correct? That is you don't want to execute these actions if one of your agents happens to add a comment since they could simply reopen it if they desired.

assuming so change your trigger as shown and add the condition just prior to your if/else

2B304F6F-FCA6-4634-8C67-2AE8B7C72208.jpeg

Now, if you do wish the rule to execute if an agent comments then leave off the extra condition.

Phil Buckley February 1, 2023

Hi Jack,

Yes, you are correct with your assumption. Only execute if the comment was made by the customer. 

Thanks for the highlighted information, it now looks like this:

 

Reopen on reply.JPG

 

Kind regards

Phil

Gokul Gopinath September 25, 2023

Do we have an option to calculate business days in this? I mean, instead of -7d, can we calculate -7 business days?

0 votes
Answer accepted
Phil Buckley March 2, 2023

@Jack Brickey I have another/further question relating to this, rather than creating a new thread I thought I put it here.

Are you able to answer this one....

Is automation the right place for what I am wanting to achieve or should additional steps be added to a Workflow?


Many thanks

Phil

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 2, 2023

Hi Phil, yes, I think automation is the right tool for the job here. Are you still having issues with setting this up correctly?

Phil Buckley March 3, 2023

Thanks Jack,

Well... I think I have it configured correctly but it is not working in a test project. 

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 3, 2023

Please provide a screenshot of rule and audit log showing where things are going wrong.

Phil Buckley March 3, 2023

Capture.PNG

Currently set to -2d for testing purposes. 

Capture2.PNG


Like Gokul Gopinath likes this
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 3, 2023

I think you have a grammar issue here... "auther" should be "author".


One tip I suggest when creating/testing rules is to use the Log action. For example here you could log the resolutiondate just prior to the Compare two values. Then in the audit log it records the data for easy viewing.

Phil Buckley March 3, 2023

Your right.... grammar issue. Its working now. 
Many thanks.

 

I'll look at implementing the log action to. 

 

Kind regards

Phil

Like Jack Brickey likes this
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 3, 2023

Please consider accepting the answer.

Suggest an answer

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

Atlassian Community Events