Forums

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

Scriptrunner WF Validation: Worklog Must Be provided during the transition

Jeffrey Bistrong
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 Champions.
April 28, 2026

It seems I am only able to tell script runner that timespent is not empty for a WF transition validator. 

 

The problem is that sometimes our tickets go from in progress --> testable and they need to be billed accurately to the client. We are missing out on lost billing hours by not forcing users to log timespent each time the transition is made.

Has anyone had success in getting this to work in Scriptrunner (not another tool). I read here that someone had success with it in another tool: https://community.atlassian.com/forums/Jira-questions/How-to-use-workflow-validators-to-force-time-logging/qaq-p/824962

1 answer

0 votes
Aaron Pavez _ServiceRocket_
Community Champion
April 28, 2026

Hi @Jeffrey Bistrong 

You can do this without Scriptrunner. That would be overkill.

Just add a validator for time spent not empty whem transitioning to In progress.

Add a message: "Please log time before moving to In progress"

Any whys you can't use this option instead of Scriptrunner?

Or create a screen, add Log Work

add the screen in the transition

Screenshot_20260428_121908.jpeg

Even if you go back to the previous status, transition again and you will be asked to add a value to time spent, even if you've already added one.

Regards

Jeffrey Bistrong
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 Champions.
April 28, 2026

its too cumbersome to do in native jira, because we have a field called client-billable and we only want to enforce it if client-billable = yes. I have it configured this way on several of my workflows, and it was a huge PITA to configure this way

Aaron Pavez _ServiceRocket_
Community Champion
April 28, 2026

Ok, now that's a bit clearer.

Add the Jira expression as Validate details

You could use this to validate that the time tracking field is not empty, and if the client billable check box is Yes (what type of field is on your site)

issue.customfield_10599.some(option => option.value == "Yes") && issue.remainingEstimate != null

Screenshot_20260428_151853.jpeg

Hope this works!!

Suggest an answer

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

Atlassian Community Events