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

How can Implement a way to be unable to close ticket until a day after an End Date Field is reached?

Jayven Khoonsirivong
Contributor
February 13, 2024

I am looking into a way to be unable to close a ticket until a day after our event end date field is reached. On top of this, when the day is reached, put in an internal comment by the system, or as a specific user, to mention its now available to close. 

My logic goes:

Ticket created 12/1/24. Which includes event end date 12/8/24.

On 12/8, put in an internal comment "Sample". On 12/9, you are now able to close the ticket.

2 answers

1 accepted

1 vote
Answer accepted
Aaron Pavez _ServiceRocket_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 15, 2024

As @Matt Parks mention.

You must use a third-party plugin since you need to add a condition between two fields.

either one of those is a good fit. But I'm inclined to JSU. easy and powerful and less coding.

But based on the screenshot you already have a third-party plugin. It seems its JWT:

https://marketplace.atlassian.com/apps/29496/jira-workflow-toolbox?hosting=cloud&tab=overview

Since I'm not versed in that app, reach out to them for your use case. they should be able to help you.

> And this is under the All transition in the workflow

You need to set the conditions under the transition you need. 

way to be unable to close a ticket

on your use case it will be on the RESOLVED or DONE. or the one you use to close the Jira issue.

Regards

Jayven Khoonsirivong
Contributor
February 15, 2024

I used @Matt Parks 's suggestion along with yours. JSU was the way to go and this works with my use case. Time to edit some workflows! :) 

0 votes
Aaron Pavez _ServiceRocket_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 13, 2024

Hi @Jayven Khoonsirivong 

You can use a condition in the workflow to impede the Status change to DONE by using the Value field:

Value Field Allows to execute a transition if the given value of a field is equal to a constant value, or simply set.

2024-02-13 16_58_05-Add Workflow Transition Condition - Jira — Mozilla Firefox.jpg

Then you can use a date field with the format mentioned in the information box.

Regards

Aaron

Jayven Khoonsirivong
Contributor
February 13, 2024

Hi Aaron. Im seeing Triggers, Conditions, Validators, and Post Functions in the workflow transitions. No 'Add Parameters To Condition' as you shown (unless Im in the wrong area of course).

Screenshot 2024-02-13 124830.png

Aaron Pavez _ServiceRocket_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 13, 2024

Hi @Jayven Khoonsirivong 

Click on Add condition -> Value field(the last one)

Regards

Aaron

Jayven Khoonsirivong
Contributor
February 13, 2024

Hi @Aaron Pavez _ServiceRocket_ . I want to make sure this is the right logic:

So it seemed like the value field couldnt include a condition statement to check todays date vs the event date field I was hoping for and routed the logic into a "Comparison Condition based on 2 fields based on the following parameters"

Screenshot 2024-02-13 162000.png

Would this allow the transition to resolved work as intended?

And this is under the All transition in the workflow

Screenshot 2024-02-13 155622.png

Matt Parks
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.
February 15, 2024

Do you have either Scriptrunner or JSU installed?

If you have JSU, you could add a "JQL Condition (JSU) and put in the following in the 'JQL Expression' field:

key = {issue.key} and "Event Date" >= startOfDay(1)

Then select the 'Must find issues' radio button

 

If you have Scriptrunner, you could do the same thing with the 'JQL query matches condition' option, but just put "Event Date" >= startOfDay(1) in the 'JQL Query' box. Since Scriptrunner is running the JQL and specifically looking for this particular issue in the query, you don't need to do the "key = {issue.key}" portion.

Obviously, this assumes that the name of your custom field is Event Date. If it's something else, you'd need to update the query to use the correct custom field name.

Jayven Khoonsirivong
Contributor
February 15, 2024

This is perfect! I edited the JQL conditions a bit to key = {issue.key} AND "Event End Date" <= now()

Resolve button is now only available after the event date. Thanks for the help!

Vicente Domínguez _Decadis AG_
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.
February 16, 2024

Hello @Jayven Khoonsirivong,

I am part of the support team of Decadis  and I would like to propose an alternative solution as well using the JWT Logical validator or the Logical condition as it seems that you also use this app:

{issue.cfnnnnn} <= {system.currentDateAndTime}

Or this one if you want to consider the additional day:

{issue.cfnnnnn} < datePart({system.currentDateTime}, LOCAL)

Please, replace nnnnn in the expressions with the ID of the "Event End Date" field. Note that it is necessary to remove the percentage signs "%"of the field codes to operate with them as numbers.

If you need more information about this or other implementations, please, do not hesitate to contact us in this thread or via our Support Service Desk or visit our documentation.

Best regards,

Vicente

 

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, team '25, conference, certifications, bootcamps, training experience, anaheim ca,

Want to make the most of Team ‘25?

Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.

Learn more
AUG Leaders

Upcoming Jira Events