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
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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Hope this works!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.