JIRA Behaviours Plugin - Freeze (read-only) Due Date and Due Date & Time fields in a certain Project.

We need to freeze (read-only) Due Date and Due Date & Time fields in a certain Project. No users should be able to change or modify these fields, only project admin role should be able to edit this field.

I was able to apply these changes using the behaviours plugin by adding these fields, made them read only and added the condition to all steps. The problem is that these two fields are also impacted on the create issue screens, that means that the users will not be able to add the due date when creating the ticket.

Is it possible to make these two fields read only in all steps of the workflow using behaviours plugin but not in create issue screen?

Please let me know if there is any additional information needed on this regards.

Thanks!

2 answers

0 votes

In the most recent version you can use the initialiser function. In all cases other than create there will be an issue already created, so you could use something like:

if (! getUnderlyingIssue()) {
    getFieldById("duedate").setReadOnly(true)
}

@Jose Daniel Rodriguez I'm almost a year late, but I just ran into this myself and was able to get by it but adding another condition to my behaviour, an 'except' condition for just the 'Create' step.  This appears to be working for us.

So in our case, we're restricting a field to 'Readonly' when it's in an 'On Hold' status, and like you, when we created a ticket, it was also restricted at that step.  Addind another condition (except) to the same behaviour, for action 'Create' solved this for us.  Creating tickets works as expected, the field is not restricted, and then when it goes into 'On Hold' is is restricted.

 

Conditions:

  • When:
    • For step: On Hold (9) 
  • Except:
    • For action: Create (1) 

 

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...

24,547 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