Hi
We have two security levels which requires the user to set an assignee and unassigned is not allowed. I then tried to add the following script into a validator in the "Create" transition.
if(issue.getSecurityLevelId() == 10305 || issue.getSecurityLevelId() == 10308) { issue.assignee != null }
However, now the create dialogue wants an assignee for every security level. It seems like it ignores my if-check.
Can somebody help me on this?
Thanks and best regards
Marius
Solved it with this condition:
((issue.getSecurityLevelId() == 10305 || issue.getSecurityLevelId() == 10308) && issue.assignee != null) || (issue.getSecurityLevelId() != 10305 && issue.getSecurityLevelId() != 10308)
However, can't I use if-checks the way I did in my first post?
try using
if (issue.getSecurityLevelId() == 10305L || issue.getSecurityLevelId() == 10308L) { return issue.assignee != null } return true
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh, I see Thanks that works as well. I guess the letter L after the security level ID is a mistype? I removed it and it worked either way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
L means a "long" with that number, see http://stackoverflow.com/questions/769963/javas-l-number-long-specification
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh, okay. Didn't know that but I'll keep this in mind. thanks again
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.