I'm using ScriptRunner's Fields Changed Validator to make sure the Time Spent (the validator notes this as "Log Work") field is changed during a workflow transition. I can see that this validator is accurately preventing the transition from working if Time Spent is not entered on the transition screen, however this validator doesn't tell the user what is wrong - the transition screen just sits there until the user guesses at the field that is preventing the transition.
Using the latest ScriptRunner and Jira Software Server LTS at the moment.
Map<String,ModifiedValue> modifiedValues = ((MutableIssue)issue).getModifiedFields();
Thanks for the suggestion, but the simple scripted validator doesn't work. If I put time in the Time Spent field during the transition it still throws the validation message. We've had this issue forever with checking for issue links added during transitions as well.
I'll see where I can get with Adaptavist support.
You are correct, I obviously hadn't tested my suggestion.
Like you, I can't figure out how to access the log work details submitted as part of a transition screen.
But maybe I can suggest a different workaround using behaviour. It's still not perfect.
This issue I have here, is that the message is only visible when you've checked the "log work" box to expand and view the dependent fields. The form is still prevented from submitting, however. So maybe tagging the error to another field would be necessary
Hello Community! We thoroughly enjoyed this just-for-fun conversation in the Jira Admin Group about what it's like to be a Jira Admin. For #JiraJuly, our talented designers created these graphics t...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events