set Custom field read only when the value of another custom field reaches 4 in post function

achref bziouech September 20, 2017

Hello Jira Masters,

I have two custom fields: DueDateCounter (number) and Due date for the Current Assignee (Date) ,

In each transition I have a post function that increases the DueDateCounter by 1 and then add two days to the due date for the Current Assignee custom field.
When DueDateCounter reaches 4 the due date for the Current Assignee  stays unchangeable and the DueDateCounter stop increasing.

the problem that any user can modify the Due date for the Current Assignee field by the option "click to edit" .
I need to create another post function that blocks this option when the value of DueDateCounter =4

Can you please help?

Thank you

 

1 answer

0 votes
Gaston Valente
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.
September 20, 2017

Hi!

If the two fields are modified only by code, you can remove both of the fields from the edit screen, they should be only in the view screen.

If you remove the fields from the edit screen they will be "read-only" from the jira ui

achref bziouech September 20, 2017

Hello Gaston , Thank you for this quick response please tell me if you have an idea about  how to remove a custom field from edit screen in a post function ? (from the code)

Gaston Valente
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.
September 20, 2017

Hi, may be I was not clear.

you need to modify the fields from the post functions just like your doing right know

the only change is to remove the field from the edit screen from the project configuration

Suggest an answer

Log in or Sign up to answer