Recently we see a lot of messages that read similar to this:
There are fields that are required or in an error state, but the administrator has hidden them or made them read only using a behaviour.
Please contact your administrator.
How can we disable these? I need to keep these fields as read-only because I dont want the user to change them on particular transitions.
If you were to get rid of the error messages, your users would not know why they can't do what they're trying to do. That would be a very counter-productive and annoying thing to do to them.
You can get rid of them in one way - configure the system so that your people can use it properly.
Not really. If a field is required and already populated in a previous transition why is it an error if the field is required in the current transition?
The summary field is always required for instance. If it is really an error to have the Summary field as read only, why is it allowed?
I do see value in these messages for case where for instance a field is required or in error and the field is hidden.
If a field is required, read-only, and empty (but not hidden), isnt this error message redundant as the "problem" will be evident in the form when the user tries to submit it?
We have encountered a similar issue with these error messages
In our case, we have a custom field that calculates budget percentage.
The formula is being calculated in SR Behaviours with a formula ((A+B)/C)*100 where A, B, and C are also custom fields. When we enter values into fields for the first time (either while creating an issue or editing an issue when the % field is empty), the percentage is being calculated correctly without errors.
As soon as we edit one of the fields (A, B, C) when the percentage field is already calculated, a Jira error message pops up in the upper right corner (There are fields that are required or in an error state...) and an additional warning message shows up on the edit screen stating that the value of the previous % calculation is an invalid number ("'96.67' is an invalid number"). If one deletes the value in the calculated percentage field and clicks "update" the error message is still there.
The code used in the behaviors is quite simple:
@BaseScript FieldBehaviours fieldBehaviours
FormField fCommitmentBudget = getFieldById("customfield_15302")
FormField fActualBudget = getFieldById("customfield_15303")
FormField fFinalConfirmedBudget = getFieldById("customfield_15315")
def cfCommitmentBudget = fCommitmentBudget.value as float
def cfActualBudget = fActualBudget.value as float
def cfFinalConfirmedBudget = fFinalConfirmedBudget.value as float
FormField cfPerOfSpentBudget = getFieldById("customfield_15304")
def calculation = ((cfCommitmentBudget + cfActualBudget)/cfFinalConfirmedBudget)*100 as float
And no restrictions like "read-only" or setHidden/setReadOnly are being used on any of these fields.
Any suggestion what else can cause this?
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events