Hi All,
I'm new to scriptrunner and what I'm trying to achieve is to hide specific parts (like side-bar-panel) and some fields like reporter, watchers and so on to get the minimal information necessary for a user to perform tasks on an issue.
I'm trying to do that with scriptrunner's fragment>
So far I've code like
import com.atlassian.jira.component.ComponentAccessor
def user = ComponentAccessor.jiraAuthenticationContext.getLoggedInUser()
def UserInTeam = ComponentAccessor.getGroupManager().isUserInGroup(user, "Team A")
def IsCompliancyProject = (issue.getKey()=="COM")
if ( IsCompliancyProject ) {
if ( !(UserInTeam) ) {
false;
}
else {
true
}
}
else {
true;
}
The goal is to hide specific items only when the current user is not member of the "Team A" and the current issue belongs to project "COM".
What I'm not getting fixed is the check on the issue that is selected by the user.
The code above checks if the project exists (and it does) so only differentiates for the user membership.
How can I create a check that validated the issue's project-key.
thanks for all your answer
Kind regards
Harry Pieterse