Temporary permission change Edited

Hi, I would like to make script where if speciffic person will take a days off (holiday) everyone else in service desk project will not be able to assign him to any issue. I wanna make a new project, let's say i will name it "worker holidays" and if i will assigne someone who goes to holiday to this issue and i will set the start date and end of his holiday so no one from the main service Desk will not be able to assign him during his holiday. When he gets back, he will get earlier permissions 


So my questions is, is there any possibility to change the permissions for a temporary time?. Maybe you have another idea to make this possible in jira core.



1 answer

This widget could not be displayed.

I'll start off by saying that I am not a JIRA administrator by any means. However, I think a naive solution to this problem is to create a new user group in JIRA for those on holiday. If they're on holiday, add them to the "holiday-users" group.

Then, you could simply add a validator to the workflow which will prevent anyone from assigning an issue to that person:

import com.atlassian.jira.component.ComponentAccessor
def groupManager = ComponentAccessor.getGroupManager()
!groupManager.isUserInGroup(issue.assignee?.name, 'holiday-users') 

When they're back from holiday, just remove them from the group. There will be no need to change the script or mess with an end date and start dates. 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

488 views 3 18
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you