Forums

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

Behavior to set done issues read-only

Lorenzo Brazzi January 22, 2024

Hi all,

I am trying to code a behavior that iterates through all the fields in my current issue and sets them as read-only, applicable onyl if the issue is closed. Can anyone help me here? 

Thanks in advance :)

1 answer

1 accepted

0 votes
Answer accepted
Aswin Raj D
Community Champion
January 22, 2024

Dear @Lorenzo Brazzi ,

Instead of going through all the fields and making them read only, using script this may cause a performance issue for the page. I suggest you do the same using the inbuilt feature.

Select the fields in the behavior and add the workflow step condition as below.

Capture3.PNG

Lorenzo Brazzi January 22, 2024

Dear @Aswin Raj D ,

 

Thanks for your answer. That's actually what I was trying to avoid. Is there an option of selecting *all felds* instead of adding one by one?

 

Thanks.

Aswin Raj D
Community Champion
January 22, 2024

Dear @Lorenzo Brazzi ,

Yes, this can be achieved by adding workflow property,

And the property should be set as follows:

jira.issue.editable=false

Goto your workflow -> select your status -> view properties.

Capture.PNG

Property Key = jira.issue.editable
Property Value = false

jira.issue.editable

You may not want an issue to be editable when it’s on a particular status. For example, once an issue is in a “Done” status, you may want to restrict editing to ensure no data changes after work is completed.

Examples

Use case

Key

Value

To make an issue editable when it's on a particular status.

jira.issue.editable

true

To disable editing when an issue is on a particular status. Often used on a final status.

jira.issue.editable

false

 

for more details, please have a look at Atlassian documentation on workflow properties

 

Suggest an answer

Log in or Sign up to answer