Forums

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

Clear a Read-Only Field

Will Richardson February 14, 2019

I have seen a couple threads on this topic, but wanted to see what the most recent solutions are for this problem:

I have a few fields on my View screen that are calculated with a Groovy post-function. I would like to give the user the option to re-calculate these numbers; however, there are times when some of the calculated fields will be no longer relevant once it is re-calculated, so I would like to clear all of these calculated fields before the calculation re-runs. I have gotten this to work with non-read-only fields, and ideally I would just move forward with that solution, but our organization would prefer to have those fields be read-only so users don't distort the numbers. At this point, I haven't figured out how to clear the read-only fields before I run the calculations a second time.

I have read elsewhere that I would need to write a script to clear read-only fields, but I haven't quite figured out how to write it.

Any suggestions would be appreciated!

1 answer

0 votes
Marc Minten (EVS)
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.
February 15, 2019

I am not sure understanding your issue : clearing calculated before re-calculation seems to be strange to me, as the recalculation will anyway overwrite the values ?

Anyway, if you are using scriptrunner, you could use behaviors to make the calculated fields editable/rad-only based on for example the user role in the project (for example only admin can edit), or other us criteria.

Also you could create "dummy" workflow transitions (going from one status to itself) that clear the fields and make this workflow transition only available for specific users (based again on projetc role, group, ..)

Will Richardson February 15, 2019

Thanks for the response, Marc. I removed the fields from the Edit screen, and that resolved my issue. I appreciate your input!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events