Hi Professionals,
I am having difficulties in set up the below condition in jIRA. I am veru new to JIRA so seeking for the help. Hope to get help from you.
I have two fields, customfield_1 with dropdown value A, and B and Customfield_2 with dropdown value X, and Y. Now when the value in either of the field is selected that bug should not be Assign to the user in Group.
Conditions are:
1) If I am creating bug with the 1st customfield as A OR 2nd customfield as Y, I should NOT be able to Assign the bug to the certain Group. The group name is SDLC_Test.
2) If I am creating bug with the 1st customfield as A OR 2nd customfield as X, I should NOT be able to Assign the bug to the certain Group. The group name is SDLC_Test.
3) If I am creating bug with the 1st customfield as B OR 2nd customfield as Y, I should NOT be able to Assign the bug to the certain Group. The group name is SDLC_Test.
4) If I am creating bug with the 1st customfield as B OR 2nd customfield as X, I SHOULD be able to Assign the bug to the certain Group. The group name is SDLC_Test.
Please help. Thanks.
There are following options to do this:
1) reorganise you jira: create 4 diffenrent projects for each case. Create project role for assignable users and grant assignable users permission to this role/
2) Create a script validator. It colud be done with custom plugin or with Script validator provided by Script runner plugin. I could help you with script to validate.
Which option you select?
Here is code:
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.Issue import com.atlassian.jira.issue.customfields.option.Option import com.atlassian.jira.issue.fields.CustomField import com.atlassian.jira.security.groups.GroupManager CustomField customField_1 = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("customField_1") CustomField customField_2 = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("customField_2") Issue issue String option1 = ((Option) issue?.getCustomFieldValue(customField_1)).getValue() String option2 = ((Option) issue?.getCustomFieldValue(customField_2)).getValue() def user = issue?.getAssignee(); GroupManager groupManager = ComponentAccessor.getGroupManager() if(option1.equals("A")){ if(option2.equals("Y")){ return !groupManager.isUserInGroup(user, "SDLC_Test") } return !groupManager.isUserInGroup(user, "SDLC_Test") } if(option1.equals("B")){ if(option2.equals("Y")){ return !groupManager.isUserInGroup(user, "SDLC_Test") } return !groupManager.isUserInGroup(user, "SDLC_Test") }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am having issue. What is the mistake am I doing pls? I have y below code in Validator tab of Create transition.
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.Issue import com.atlassian.jira.issue.customfields.option.Option import com.atlassian.jira.issue.fields.CustomField import com.atlassian.jira.security.groups.GroupManager
CustomField data = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Sensative Data")
CustomField env = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Environment")
Issue issue
String option1 = ((Option) issue?.getCustomFieldValue(data)).getValue()
String option2 = ((Option) issue?.getCustomFieldValue(env)).getValue()
def user = issue?.getAssignee();
GroupManager groupManager = ComponentAccessor.getGroupManager()
if(option1.equals("Yes")){
if(option2.equals("PROD")){
return !groupManager.isUserInGroup(user, "OFFSDLC_TEST_DEV")
}
return !groupManager.isUserInGroup(user, "INSDLC_TEST_QA") }
Here, I am trying to do is: I have Sensative Data = Yes and ENV = Prod, when Both are selected as Yes and Prod or when One is selected - I should not be assign the defect to users in OFFSDLC_TEST_DEV group. But should be able to assign to other group.
Please help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vasiliy Zverev,
I ran the avove code in Script Console and got the error message as below. Please help me.
Error
Cannot invoke method getValue() on null object
Error
Cannot invoke method getValue() on null object
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It mean that one if custom field values are null. There are two options:
Which one is for you?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vasiliy Zverev,
Thank you so much for your continuous support.
Below is my update.
Both fields are made made Required and both fields have dropdown values. I would need both fields to use. So 1) if my 1st field = Yes and/or 2nd Field = PROD, this defect should NOT be able to assign to the user of Groups. Groups example, SDLC_Test, SDLC_Dev.
2) if my 1st Field = Yes and/or 2nd field = Test, then this is still same as above case #1.
3) if my 1st field = NO and/or 2nd field = Prod, then it should be same as above case #1.
4) if my 1st field = NO, and 2nd Field = Test, then this defect Should be able to assign to users in any group. Groups are SDLC_Test, SDLC_Dev, SDLC_INT, SDLC_UAT.
Please help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Lets try this way
PROD Test
_________________________________
Yes |-SDLC_Test | -SDLC_Test
| - SDLC_Dev | - SDLC_Dev
_________________________________
NO | -SDLC_Test | + SDLC_Test, +SDLC_Dev, +SDLC_INT, +SDLC_UAT
| - SDLC_Dev |
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.
Try this one
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.Issue import com.atlassian.jira.issue.customfields.option.Option import com.atlassian.jira.issue.fields.CustomField import com.atlassian.jira.security.groups.GroupManager CustomField customField_1 = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("customField_1") CustomField customField_2 = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("customField_2") Issue issue String option1 = ((Option) issue?.getCustomFieldValue(customField_1)).getValue() String option2 = ((Option) issue?.getCustomFieldValue(customField_2)).getValue() def user = issue?.getAssignee(); GroupManager groupManager = ComponentAccessor.getGroupManager() if( (option1.equals("PROD")) || (option2.equals("Yes")) ){ if ( (groupManager.isUserInGroup(user, "SDLC_Test")) && (groupManager.isUserInGroup(user, "SDLC_Dev")) ) { return false } else return true } else if( (groupManager.isUserInGroup(user, "SDLC_Test")) && (groupManager.isUserInGroup(user, "SDLC_Dev")) && (groupManager.isUserInGroup(user, "SDLC_INT")) && (groupManager.isUserInGroup(user, "SDLC_UAT"))){ return true } else return false
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vasiliy Zverev,
My challange being new to JIR and Groovy scrip is that, I am not sure where to put this script in my project? Will this script goes in Create transition Postfunction or Validator or condition? or In a Behavior of Customefield_1 or customefield_2? or somewhere else? Please advice.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I put above code in Create Transition and got the following error.
Time (on server): Fri Dec 16 2016 11:42:49 GMT-0600 (Central Standard Time)
The following log information was produced by this execution. Use statements like:log.info("...") to record logging information.
Time (on server): Fri Dec 16 2016 11:42:49 GMT-0600 (Central Standard Time)
The following log information was produced by this execution. Use statements like:log.info("...") to record logging information.
2016-12-16 12:42:49,656 WARN [managers.DefaultCustomFieldManager]: Warning: returning 1 of 12 custom fields named 'Environment' 2016-12-16 12:42:49,659 ERROR [workflow.ScriptWorkflowFunction]: ************************************************************************************* 2016-12-16 12:42:49,659 ERROR [workflow.ScriptWorkflowFunction]: Script function failed on issue: null, actionId: 1, file: <inline script> java.lang.NullPointerException: Cannot invoke method getValue() on null object at Script77.run(Script77.groovy:12)
Note: There are Multiple fields Named as Environment. That might be causing issue where it says Null value because Not all Environment fields has the sameValues listed.
Is there a way to change: ObjectByName to ObjectByID?
CustomField customField_1 = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName(
"customField_1"
)
to
CustomField customField_1 = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByID(
"customField_1"
)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Both methods return the same result - custom field.
It seems that there is no value for this field. Make sure of it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vasiliy Zverev,
Thanks again for your continious effor on this item.
Meantime, I removed the conditiona dn tried to do only with Customfield and I still have the same issue, meaning the I am not getting the expected result.
Also, the environment Fiedl which I have in my project has the correct value in its dropdown but, it throwing error message as it doesnot have dropdown value.
Thus, I tested your code with another field, and Im still at roadblock.
Thanks Again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I forgot to detele line with issue variable initialisation. try this
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.Issue import com.atlassian.jira.issue.customfields.option.Option import com.atlassian.jira.issue.fields.CustomField import com.atlassian.jira.security.groups.GroupManager CustomField customField_1 = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("customField_1") CustomField customField_2 = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("customField_2") String option1 = ((Option) issue?.getCustomFieldValue(customField_1)).getValue() String option2 = ((Option) issue?.getCustomFieldValue(customField_2)).getValue() def user = issue?.getAssignee(); GroupManager groupManager = ComponentAccessor.getGroupManager() if( (option1.equals("PROD")) || (option2.equals("Yes")) ){ if ( (groupManager.isUserInGroup(user, "SDLC_Test")) && (groupManager.isUserInGroup(user, "SDLC_Dev")) ) { return false } else return true } else if( (groupManager.isUserInGroup(user, "SDLC_Test")) && (groupManager.isUserInGroup(user, "SDLC_Dev")) && (groupManager.isUserInGroup(user, "SDLC_INT")) && (groupManager.isUserInGroup(user, "SDLC_UAT"))){ return true } else return false
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vasiliy Zverev,
I still have a roadblock. Below is a code I copied from your and reformat as per my fields and values.
Here, I am choosing "Yes" from Sensative Data field. So I should be able to Assign a defect to a user who is in Group "SDLC_Test". But, I am able to assign. So this is an issue.
I did not tested this with environment field. Lets settle down the condition with one field 1st.
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.issue.customfields.option.Option
import com.atlassian.jira.issue.fields.CustomField
import com.atlassian.jira.security.groups.GroupManager
CustomField senti = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Sensative Data")
//CustomField env = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Environment")
String sentid = ((Option) issue?.getCustomFieldValue(senti)).getValue()
//String envt = ((Option) issue?.getCustomFieldValue(env)).getValue()
def user = issue?.getAssignee();
GroupManager groupManager = ComponentAccessor.getGroupManager()
if( (sentid.equals("Yes")) ) {
//|| (envt.equals("PROD")) ){
if ( (groupManager.isUserInGroup(user, "SDLC_Test"))
//&& (groupManager.isUserInGroup(user, "SDLC_Dev"))
) {
return false
}
else
return true
}
else if( (groupManager.isUserInGroup(user, "SDLC_Test"))
&& (groupManager.isUserInGroup(user, "SDLC_Dev"))
&& (groupManager.isUserInGroup(user, "SDLC_INT"))
&& (groupManager.isUserInGroup(user, "SDLC_UAT"))){
return true
}
else return false
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I put the above code in Create transition Validator tab. And got the below error.
Time (on server): Tue Dec 20 2016 12:43:26 GMT-0600 (Central Standard Time)
The following log information was produced by this execution. Use statements like:log.info("...") to record logging information.
2016-12-20 13:43:26,113 ERROR [workflow.ScriptWorkflowFunction]: ************************************************************************************* 2016-12-20 13:43:26,124 ERROR [workflow.ScriptWorkflowFunction]: Script function failed on issue: null, actionId: 1, file: <inline script> groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method com.atlassian.jira.security.groups.DefaultGroupManager#isUserInGroup. Cannot resolve which method to invoke for [null, class java.lang.String] due to overlapping prototypes between: [interface com.atlassian.crowd.embedded.api.User, class java.lang.String] [interface com.atlassian.jira.user.ApplicationUser, class java.lang.String] at com.atlassian.jira.security.groups.GroupManager$isUserInGroup$0.call(Unknown Source) at Script162.run(Script162.groovy:20)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is the reason why I do not like groovy style for def. Try this version with variable clas specification
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.Issue import com.atlassian.jira.issue.customfields.option.Option import com.atlassian.jira.issue.fields.CustomField import com.atlassian.jira.security.groups.GroupManager import com.atlassian.jira.user.ApplicationUser CustomField senti = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Sensative Data") //CustomField env = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Environment") String sentid = ((Option) issue?.getCustomFieldValue(senti)).getValue() //String envt = ((Option) issue?.getCustomFieldValue(env)).getValue() ApplicationUser user = issue?.getAssignee(); GroupManager groupManager = ComponentAccessor.getGroupManager() if( (sentid.equals("Yes")) ) { //|| (envt.equals("PROD")) ){ if ( (groupManager.isUserInGroup(user, "SDLC_Test")) //&& (groupManager.isUserInGroup(user, "SDLC_Dev")) ) { return false } else return true } else if( (groupManager.isUserInGroup(user, "SDLC_Test")) && (groupManager.isUserInGroup(user, "SDLC_Dev")) && (groupManager.isUserInGroup(user, "SDLC_INT")) && (groupManager.isUserInGroup(user, "SDLC_UAT"))){ return true } else return false
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I tried to put the above code in Validator of Create transition and got the error as below.
image2016-12-21 10:27:21.png
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is updated version:
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.Issue import com.atlassian.jira.issue.customfields.option.Option import com.atlassian.jira.issue.fields.CustomField import com.atlassian.jira.security.groups.GroupManager CustomField senti = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Sensative Data") //CustomField env = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Environment") String sentid = ((Option) issue?.getCustomFieldValue(senti)).getValue() //String envt = ((Option) issue?.getCustomFieldValue(env)).getValue() def user = issue?.getAssignee(); GroupManager groupManager = ComponentAccessor.getGroupManager() if( (sentid.equals("Yes")) ) { //|| (envt.equals("PROD")) ){ if ( (groupManager.isUserInGroup(user, "SDLC_Test")) //&& (groupManager.isUserInGroup(user, "SDLC_Dev")) ) { return false } else return true } else if( (groupManager.isUserInGroup(user, "SDLC_Test")) && (groupManager.isUserInGroup(user, "SDLC_Dev")) && (groupManager.isUserInGroup(user, "SDLC_INT")) && (groupManager.isUserInGroup(user, "SDLC_UAT"))){ return true } else return false
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I really do not understand this. I am not sure what is the issue. I am still not geting the expected result. I put the code in Post function of Create transition and the log says no Failure when it ran but I am not having the result. Can you pls help me?
image2016-12-23 14:28:51.png
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey, it is not a postfunction. It is a scripts validator. It prevent transition if condition is false.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks much for your continious support.
I put the above code in Validator of Create Transition and worked perfect when I have one Customfield condition, but when I try to implement the code condition in both fields then its not working as expected. I have implemented your code to satisfy the condition in two of my fields but no luck.
Note: If I implement this code in 1 field at a time it is working fine.
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.Issue import com.atlassian.jira.issue.customfields.option.Option import com.atlassian.jira.issue.fields.CustomField import com.atlassian.jira.security.groups.GroupManager CustomField senti = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Sensative Data") CustomField env = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Environment") String sentid = ((Option) issue?.getCustomFieldValue(senti)).getValue() String envt = ((Option) issue?.getCustomFieldValue(env)).getValue() def user = issue?.getAssignee(); GroupManager groupManager = ComponentAccessor.getGroupManager() if( (sentid.equals("Yes")) || (envt.equals("PROD")) ){ if ( (groupManager.isUserInGroup(user, "SDLC_Test")) && (groupManager.isUserInGroup(user, "SDLC_Dev")) ) { return false } else return true } else if( (groupManager.isUserInGroup(user, "SDLC_Test")) && (groupManager.isUserInGroup(user, "SDLC_Dev")) && (groupManager.isUserInGroup(user, "SDLC_INT")) && (groupManager.isUserInGroup(user, "SDLC_UAT"))){ return true } else return false
There is no any error log loaded after running this script.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Update on the above issue!!!
I reformat the above code as below. And now If I choose Sensative data = Yes and Environment != Prod, Or if I do Sensative Data != Yes and Environment = Prod, the below code works just fine. Which is good.
Now the issue here are:
1) If I do Sensative data = Yes and Environment = Prod, the code doesnot give me the expected result, which means I am still able to assign defect to the user in SDLC_Test group.But infact I should not be able to assign to that user.
2) If I do Sensative Data = Yes and Try to Assign to a user of "SDLC_INT", I am not able to Assign the defect. Same issue is happening with Environment field.
But, this is fine for Users of"SDLC_Test".
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.Issue import com.atlassian.jira.issue.customfields.option.Option import com.atlassian.jira.issue.fields.CustomField import com.atlassian.jira.security.groups.GroupManager CustomField senti = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Sensative Data") CustomField env = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Environment") String sentid = ((Option) issue?.getCustomFieldValue(senti)).getValue() String envt = ((Option) issue?.getCustomFieldValue(env)).getValue() def user = issue?.getAssignee(); GroupManager groupManager = ComponentAccessor.getGroupManager() if (govd.equals("Yes")){ if (envt.equals("PROD")) { if ( (groupManager.isUserInGroup(user, "SDLC_Test")) && (groupManager.isUserInGroup(user, "SDLC_Dev")) ) { return false } else return true } } else if( (groupManager.isUserInGroup(user, "SDLC_INT")) && (groupManager.isUserInGroup(user, "SDLC_UAT"))){ return true } else return false
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Note that variable govd is not defined, but sentid is not used. It seems that something is wrong.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Lets try this one
import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.Issue import com.atlassian.jira.issue.customfields.option.Option import com.atlassian.jira.issue.fields.CustomField import com.atlassian.jira.security.groups.GroupManager CustomField senti = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Sensative Data") CustomField env = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Environment") String sentid = ((Option) issue?.getCustomFieldValue(senti)).getValue() String envt = ((Option) issue?.getCustomFieldValue(env)).getValue() Issue issue String user = issue?.getAssigneeId(); GroupManager groupManager = ComponentAccessor.getGroupManager() if (sentid.equals("Yes")){ if (envt.equals("PROD")) { if ( (groupManager.isUserInGroup(user, "SDLC_Test")) && (groupManager.isUserInGroup(user, "SDLC_Dev")) ) { return false } else return true } } else if( (groupManager.isUserInGroup(user, "SDLC_INT")) && (groupManager.isUserInGroup(user, "SDLC_UAT"))){ return true } else return false
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Time (on server): Thu Jan 12 2017 11:03:26 GMT-0600 (Central Standard Time)
The following log information was produced by this execution. Use statements like:log.info("...") to record logging information.
2017-01-12 12:03:26,856 ERROR [workflow.ScriptWorkflowFunction]: ************************************************************************************* 2017-01-12 12:03:26,856 ERROR [workflow.ScriptWorkflowFunction]: Script function failed on issue: null, actionId: 1, file: <inline script> groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method com.atlassian.jira.security.groups.DefaultGroupManager#isUserInGroup. Cannot resolve which method to invoke for [null, class java.lang.String] due to overlapping prototypes between: [interface com.atlassian.crowd.embedded.api.User, class java.lang.String] [interface com.atlassian.jira.user.ApplicationUser, class java.lang.String] at Script153.run(Script153.groovy:19)
Time (on server): Thu Jan 12 2017 10:52:28 GMT-0600 (Central Standard Time)
The following log information was produced by this execution. Use statements like:log.info("...") to record logging information.
2017-01-12 11:52:28,427 ERROR [utils.ConditionUtils]: ************************************************************************************* 2017-01-12 11:52:28,428 ERROR [utils.ConditionUtils]: Condition failed on issue: null, built-in script:com.onresolve.scriptrunner.canned.jira.workflow.validators.SimpleScriptedValidator groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method com.atlassian.jira.security.groups.DefaultGroupManager#isUserInGroup. Cannot resolve which method to invoke for [null, class java.lang.String] due to overlapping prototypes between: [interface com.atlassian.crowd.embedded.api.User, class java.lang.String] [interface com.atlassian.jira.user.ApplicationUser, class java.lang.String] at Script153.run(Script153.groovy:19) 2017-01-12 11:52:28,428 ERROR [utils.ConditionUtils]: Script follows: import com.atlassian.jira.component.ComponentAccessor import com.atlassian.jira.issue.Issue import com.atlassian.jira.issue.customfields.option.Option import com.atlassian.jira.issue.fields.CustomField import com.atlassian.jira.security.groups.GroupManager CustomField senti = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Sensative Data") //CustomField env = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Environment") String sentid = ((Option) issue?.getCustomFieldValue(senti)).getValue() //String envt = ((Option) issue?.getCustomFieldValue(env)).getValue() Issue issue String user = issue?.getAssigneeId(); GroupManager groupManager = ComponentAccessor.getGroupManager() if (sentid.equals("Yes")){ // if (envt.equals("PROD")) { if ( (groupManager.isUserInGroup(user, "SDLC_Test")) && (groupManager.isUserInGroup(user, "SDLC_Dev")) ) { return false } else return true } //} else if( (groupManager.isUserInGroup(user, "SDLC_INT")) && (groupManager.isUserInGroup(user, "SDLC_UAT"))){ return true } else return false
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.