Forums

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

How to determine the list of fields available for editing

Alexey Gusev
Contributor
December 8, 2023

Hello everyone!

I have a Workflow that has certain statuses, and on those statuses, we can define certain properties that restrict users. For example, we have the property:

jira.permission.edit

that we can set as jira.permission.edit.group.1 and the value as jira-administrators.

This means that only users in this group will be able to edit the issue in this status.

I want to know if there is a way to restrict the list of fields available for editing in this status, either through this method or using other tools.

For example, on the edit screen, we have the fields:

Summary
Description

I want to configure it so that in a specific status, users can only edit the Summary field, but not the Description field.

1 answer

1 accepted

1 vote
Answer accepted
Craig Nodwell
Community Champion
December 8, 2023

Hi @Alexey Gusev do you have scriptrunner available?  This would be easy enough with a screen behaviour.

Alexey Gusev
Contributor
December 8, 2023

Hi! @Craig Nodwell, yes we are actively using ScriptRunner, and I was also considering using the Behaviour functionality to solve this situation, but it seemed to me that there should be another, easier way for this kind of task.

But if there are no other options, then yes, we'll have to set it up through Behaviour. Maybe you have a sample script that you could share with me?

Craig Nodwell
Community Champion
December 8, 2023

Scriptrunner is not hard, and to be honest it's one of my go to's for this type of thing ... don't fear it.  There's tons of examples available Adaptavist has a big library and lots of great documentation.  And there's lots of examples available here in the community from past posts.

Library

Post in Community 

Example:

def dropDown = getFieldById("customfield_10500")
def conditionA = getFieldById("customfield_10501")
def conditionB = getFieldById("customfield_10502")
log.debug("dropdown value" + dropDown.getValue())

if (dropDown.getValue() == "a") {
conditionA.setHidden(false);
conditionB.setHidden(true);
} else {
conditionA.setHidden(true);
conditionB.setHidden(false);

}
Alexey Gusev
Contributor
January 9, 2024

Thanks!

Suggest an answer

Log in or Sign up to answer