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
Join us to learn how your team can stay fully engaged in meetings without worrying about writing everything down. Dive into Loom's newest feature, Loom AI for meetings, which automatically takes notes and tracks action items.
Register today!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.