Code:
if(getActionName() in ["Create Issue", "Create"])
{
// Create Screen - Show all fields.
changeTypeField.setHidden(false);
}
else
{
// Any screen - Hide controls.
changeTypeField.setHidden(true);
}
When I open create issue screen from any other view issue screen it goes to else part for the first time. Then I cancel and click on create button works well, passes if condition. Edit screen works well in all condition.
So on the first time create issue screen hides controls and second time it shows.
I checked with GetActionName() it returns NULL on the first time and then it returns CREATE on the second time.
This condition is required as Admins are allowed to edit ChangeType field.
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
if(ComponentAccessor.getGroupManager().getGroupsForUser(currentUser)?.find {it.name == "Jira Administrator"})
return; // No need to perform any action.
Why don't you just remove the "type" field from the edit screen?
Hello Nic brough,
One small query regarding Time tracking settings in jira one user wants for his project default instead of minutes he want hours so using behaviour plugin or through script is it possible?? and kindly request you to if possible please share the script For time tracking settings edit for the particular project from minutes to hours through Adaptvist scriptrunner also
Thanku so much
Thanks
santhosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Maitrey Patel
Maybe I misunderstood something
But why you dont want to remove this field from others screens except create?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This condition is required as Admins are allowed to edit ChangeType field.
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
if(ComponentAccessor.getGroupManager().getGroupsForUser(currentUser)?.find {it.name == "Jira Administrator"})
return;
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.