Forums

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

Automation to prevent a ticket from closing without entering value in field (edit screen)

Dillon Scicluna February 8, 2023

An automation that does not allow any relevant tickets to close without entering a value in the Time Tracking (issue feature) field needs to be created. An  'Issue Transitioned' was set from any status to 'Closed' and 'Resolved' and a JQL condition was implemented to only affect the relevant projects since Time Tracking field is set in a default screen. However, when I come to set an 'Issue fields condition' to create a rule to check if the Time Tracking field has a value or value greater than 0, I cannot find the said 'Time Tracking' issue feature (Time Spent) field. i.e. I need to replace 'Status' with 'Time Spent'.

Screenshot_20230208_145754.png

2 answers

1 accepted

3 votes
Answer accepted
Jack Brickey
Community Champion
February 8, 2023

Hi @Dillon Scicluna ,

given that automation runs after an event, in this case, a transition, then you cannot prevent the transition that triggered the event. Another word automation runs "after the fact". you could use automation to transition the issue back if it was falsely transitioned. However, assuming you are using CMP projects then you can accomplish your goal, using a workflow Condition or Validator, depending on your exact requirement.

if I miss-interpreting your post, please let me know.

Dillon Scicluna February 8, 2023

Time Tracking is an issue features that combines Time Spent and Time Remaining. I need to create an automation to not allow tickets to transition to statusCategory Done before the Time Spent field is given a value in the edit screen.

Wojciech Wardaszko
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 9, 2023

Hi @Dillon Scicluna 

As @Jack Brickey said, Automation is not the way to stop a transition - it can't be done.

You need a validator in your workflow on the To Done transition or transitions.

Like # people like this
Jack Brickey
Community Champion
February 9, 2023

@Dillon Scicluna , please let me know if you have further questions.

Dillon Scicluna February 9, 2023

Sorted, thanks for the information totally forgot about validators :)

Kelly Phillips
Contributor
January 4, 2024

I have a validatior is my 'Resolve' transition, saying that 'Time Spent' is a required field with a value. 

However, even when there is time tracked in the 'Time Spent' field, when I try and transition to the 'Resolve' status using the 'resolve' transition, it pops up with my validator error, saying that the field needs to be populated.

Any suggestions?

Jack Brickey
Community Champion
January 4, 2024

Hi @Kelly Phillips , are you talking about workflow validators? This thread is about Automation. If Workflow validator then is it possible you are using the field modified validator rather than field required? 
IMG_3386.jpeg

Like Kelly Phillips likes this
Wojciech Wardaszko
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.
January 7, 2024

Hi @Kelly Phillips 

Can you share a screenshot of your validator? Jira has a weird field called Time tracking which comprises of three different fields: Original Estimate, Remaining Estimate and Time Spent.

Maybe the validator checks all three? I'm just guessing here.

As a side note, our app Clockwork Pro sports its own "Time logged validator" documented here. The app recently became free for instances in the 1-10 users tier.

I'm here to help :)

Cheers!

0 votes
Ashish Bijlwan
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 8, 2023

Hi @Dillon Scicluna 

Try using Advanced compare condition and use smart value {{issue.timetracking.timespent}} for time spent comparision.

 

48E78120-FD45-434C-9C2A-6E6651C2603A.jpeg

Dillon Scicluna February 8, 2023

I set the advanced compare condition to be x<1. What should the following 'Action' be to not allow the ticket to close, please?

Suggest an answer

Log in or Sign up to answer