Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Allow Customers to reopen issues only within X issue not ingnoring the if block

Pieter Van Der Merwe June 21, 2024

Good day Everyone,

 

I am stuck with the Automation implementation of the "Allow Customers to reopen...". My Problem that I am facing, is that the Automation works but it sortof ignores the if block that states " If: Matches resolved less that 5 days it will open the ticket again, however the ticket still gets opened even if the ticket is older that 5 days. 

Is there anything that I am missing to why it opens tickets older than 5 days aswell? 

This is the document that I followed to implement: 

Allow Customers to reopen issues only within X days from resolution | Jira | Atlassian Documentation

 

The automation rule:

Screenshot 2024-06-21 114838.png

 

 

Thank you very much in advance. 

 

Warm regards,

Pieter

 

 

2 answers

1 accepted

1 vote
Answer accepted
Pieter Van Der Merwe July 9, 2024

Hi Everyone,

Just an update anyone else having the same problem: We simply updated this string instead of {{now.diff(issue.resolved).days.abs}} we used {{now.diff(issue.resolutionDate).days.abs}}

 

Hope this helps. 

1 vote
Jovin
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 21, 2024

Hey @Pieter Van Der Merwe

Can I recommend a slight adjustment to your approach? I would recommend creating another status after your completed status that indicates the closure of the ticket - for the purposes of this exercise I'll call the completed status "Complete" and the closed status "Closed".

  1. Update your workflow to have another status called "Closed", it should only have 1 transition available - FROM Completed TO Closed
    1. You can optionally make the ticket read only if you use Jira properties, which I'll place right at the end of this comment.
    2. Place a condition on the transition from completed to closed of type "User is in project role" and choose "atlassian-addons-project-access".
  2. Create a new SLA called "Time to close after resolution" and configure the SLA to have 5 days. Make sure you use the appropriate calendar for your use - if you have a 24x7 calendar this would mean 120h, if you have a 9-5 calendar, this would be 40h.
    1. Start counting when: Entered status Completed
    2. Finish counting when: Entered status Closed, Resolution: Cleared (this second one lets it restart the counter when it's reopened).
  3. Create a new Automation Rule called "Close issue after 5 days" and set it up like the below:
    1. DETAILS: Ensure the actor is Automation for Jira
    2. TRIGGER: SLA threshold breached
      1. SLA: "Time to close after resolution"
      2. Trigger when SLA has: choose your preferred one - I go with breached
    3. THEN: Add an action: Transition issue
      1. Destination status: Closed
  4. Modify your existing automation rule for reopening, call it "Reopen issue on customer comment", set it up like below:
    1. TRIGGER: Issue commented
      1. Comment type: All comments
    2. THEN: Add an action: Transition issue
      1. Destination status: Work in progress (or whatever your in progress status is called).

This configuration will:

  • Automatically make tickets become "Closed", after 5 days, preventing reopening
    • You can also see how long until it becomes closed via the issue view
  • Allow reopening of tickets

Now, to provide the "read only" status properties if you want it. On your workflow, select the "Closed" status and click "Properties", then add the below two:

  • Property 1: No comments
    • Key: jira.permission.comment.denied
    • Value: true
  • Property 2: Read Only (no edits)
    • Key: jira.permission.edit.denied
    • Value: true
Pieter Van Der Merwe June 21, 2024

Hallo Jovin, 

 

Thank you so much for taking the time to reply and for the wonderful response. That said, the Automation for this is already documented and I am merly trying to find why its not working. 

 

Again your approach will help in the future and will also help alot of others as well. 

Pieter Van Der Merwe July 9, 2024

We got it working

Suggest an answer

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

Atlassian Community Events