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

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 Community Champion Sep 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

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 Community Champion Sep 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
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

25,318 views 2 7
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you