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

Field required for specific role

Edited

Our developers are required to add specific notes and instructions when resolving a ticket. 

I've created a specific field for them to do this, which is hidden from the client portal, however I'm struggling to get this working properly. 

I've successfully made it mandatory on transition to another status but, the developers don't have (and shouldn't have) the Service Desk Agent role so they can't transition tickets. 

Is there any way to setup a field that is:

  • Hidden from the client portal 
  • Editable by users in certain roles (not Service Desk Agents)

 

Appreciate I might be missing something in workflows, any advice is mega appreciate as I've read every article and community query around this but just haven't found a resolution

 

Update -

Never mind, figured out how to do this with conditions in the workflow 

 

2 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
Thorsten Letschert _Decadis AG_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
Jan 03, 2021 • edited

Obsolete due to the update of the initial question.

0 votes
Jia Jie
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jan 15, 2021

Hi Ana,

I'm not sure if this is what you're trying to achieve but you can set the field to be shown, required and editable only for users in certain roles via Scriptrunner Behaviours.

Just add in the condition to validate if the logged in user is in the certain roles, then the field is showed and required, and it can be edited. 

import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.security.roles.ProjectRoleManager

def projectRoleManager = ComponentAccessor.getComponent(ProjectRoleManager)
def user = ComponentAccessor.jiraAuthenticationContext.loggedInUser
def remoteUsersRoles = projectRoleManager.getProjectRoles(user, issueContext.projectObject)*.name

def note = getFieldByName("Notes and Instructions")

note.setHidden(true)
note.setReadOnly(true)

//If the user's roles contain "Developers"
if ("Developers" in remoteUsersRoles) {
note.setHidden(false)
note.setRequired(true)
note.setReadOnly(false)
}
else {
note.setHidden(true)
note.setRequired(false)
note.setReadOnly(true)
}

Hope this help! 

TAGS
AUG Leaders

Atlassian Community Events