Hi,
I'd like to have a post-function for issue creation that updates the "security level" field if the reporter of the ticket belongs to a certain group. I haven't been able to find a way to do this with default add-ons or Jira Workflow Toolbox or with "update on transition" add-ons.
How can I accomplish this?
Hi,
You can do it using a scripting paid plugin like :
or develop you own plugin , or using JavaScript which is not recommended
Okay, I tried PowerScripts for JSA. But I can't find hpw to specify if a user belongs to a group with a statement. Any ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Basically, I wan to do something along the lines of :
string security_level = "XYZ";
string user_group = "ABC";
if(isUserInGroup(reporter, groups, user_group)) {
security = security_level;}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you could do it like this
If (userInGroup(user_group, reporter){
security = security_level;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot. I think you missed a closing brackets, but I still get an error saying ">>if<<" is not defined. I really appreciate the help, but I'd not bother you if you could point me to a reference for the syntax.
If (userInGroup(user_group, reporter))
{
security = security_level;
}
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.
One last question, how do you refer to the "reporter" of an issue? I know currentuser() routine works -> https://confluence.cprime.io/display/SIL/currentUser
but how do I do the same for reporter?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes , you found a response :)
https://confluence.kepler-rominfo.com/display/SIL/userInGroup
the reporter is a standar variable you can look at this link it could help you a know all standard variables
https://confluence.kepler-rominfo.com/display/SIL/Variable+Resolution
Just if the answer is good , pleas could you accept it to help other
thanks in advance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi again,
the script looks good to me, it's the most simple script now:
if (userInGroup("XYZ", reporter));
{
security = "Level1";
}
But this doesn't work as expected: Even if the reporter is not a part of "XYZ" group, the issues are created wit "Level1" security level. The default is "Level0".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe you should see the if the current user is the default level security Level0 else you should add else like this
if (userInGroup("XYZ", reporter));
{
security = "Level1";
}
else{
security = "Level0";
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the response but the error was the semicolon at the end of the "if" statement. I don't feel particularly smart now. All works well now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok , good luck :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.