Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,554,884
Community Members
 
Community Events
184
Community Groups

Only allow users in group to edit custom field when status transitions to Done

Hi all,

I am on Jira Software for Cloud. A user wants editing of a custom field to be restricted to a particular group. The field is only used when the issue is resolved. I can add the field to a Resolve screen but that still won't limit editing of just that field to users in a certain group on the view/edit issue screen, right?

I'm not finding any solutions for this except for creating transitions screens etc. just wondering if there is a better way to accomplish this that anyone has experience with?

https://community.atlassian.com/t5/Jira-questions/Custom-field-edit-restriction-based-on-user-role-permission/qaq-p/2031575

https://community.atlassian.com/t5/Jira-questions/Setting-user-group-permissions-on-a-custom-field-in-JIRA/qaq-p/313497

Thanks

Natasha

1 answer

I believe that is to prevent editing of the issue in its entirety right? Not just a particular field.

Yes, only mentioned group can edit the issue in that status (in this case Done). Per your statement - " The field is only used when the issue is resolved", - then you can apply this since the field is only available when it is resolved. 

 

 

Or if you want, you an use Behaviour. Something like,

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.security.roles.ProjectRoleManager
def fieldname = getFieldById("customfield_xxxx")
// Get the current user
def currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()

if (ComponentAccessor.getGroupManager().getGroupsForUser(currentUser)?.find { it.name in ["Name of the Group"]} && getFieldScreen().name == "Name of your resolve screen") {
//log.warn('ok')
//return true
fieldname,setHidden(false)
} else {
fieldname,setHidden(false)
}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events