Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Hide specific fields/parts of the view screen

Harry Pieterse March 25, 2020

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

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian community, loom ai, atlassian loom ai, loom, atlassian ai, record recaps of meetings, meeting recaps, loom recaps, share meeting recaps,

Loom’s guide to great meetings 📹

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!
AUG Leaders

Atlassian Community Events