I am trying to ensure the resolution field has a value, any value other than null, which seems to be interpreted as not resolved
these were recommended and make logical sense, but do not work
issue.getResolution() != null
issue.getResolutionID() != null
Ilya
figured it out, this worked, was certain I had tried it before, more than once, which is when I went to the more scripted mechanisms instead of the simple Permission Validator, which was working for other datatypes we were validating
{Resolution} == "Unresolved"
I appreciate your time and effort to give me a hand
Enjoy your day
Steve
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'd suggest you then to try these two steps:
1. make sure the resolution of issue you are trying to transition is null (execute in SR console):
import com.atlassian.jira.component.ComponentAccessor
def issue = ComponentAccessor.issueManager.getIssueObject("KEY-123")
issue.resolution
2. try simply putting false in "simple validator" to be sure its' functionality isn't the issue here
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.
the main question is: where are you trying to put this piece of code?
if it's scriptrunner's validator, then make sure it's a "simple scripted" one, not a "custom", because in the latter you need to throw exception yourself
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In fact with just issue.getResolution() you get a non descriptive error, that log nothing
"It seems that you have tried to perform an illegal workflow operation."
But at least it did not allow the suer to proceed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
wait, it actually means that validator worked, what else did you expect?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, I had tried that and variations of it, but regrettably, it does not work
Jira indicates the issue as "Unresolved" in the UI, which to my understanding is that there is no resolution, null
so the validator should stop and indicate a problem, but it does not, it accepts the Unresolved resolution
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should be able to test for "anything" by just using the phrase without comparison:
issue.getResolution()
If resolution is empty, this equates to false, and if resolution has any value, it's true. So to get your query, !issue.getResolution() should invert it.
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.