I have A, B, C, D, E fields in my ticket and I have Z field.
I have all the fields in the edit screen, but the issue is when user try to edit the field, it gives option to edit right their without popping up the edit dialogue box.
In the edit dialog box the field Z is mandatory, but if user edits any A to E field right there using pencil icon besides field name/ value, it just allows ton edit.
But i have another project where the config is in such a way that using that pencil icon also pops up edit screen.
it is data center project.
This is the inline edit (pencil icon) causing your issue. As far as I am aware, you cannot disable the inline edit option, but if you have Script Runner, you can have a workaround using Behaviour to require users to edit the Z field first in order to access the others by setting them to read-only.
def zField = getFieldByName("Z")
zField.setRequired(true)
def aField = getFieldByName("A")
def bField = getFieldByName("B")
// same with cField, dField, eField
def zValue = zField.getValue()
def isZFilled = zValue != null && zValue.toString().trim()
if (isZFilled) {
aField.setReadOnly(false)
bField.setReadOnly(false)
// ...
} else {
aField.setReadOnly(true)
bField.setReadOnly(true)
...
}
I trust this will work, but please bear in mind that I haven't tested it; I just coded this and it may have some mistakes.
Thanks for the solution, I am yet to try, but my detail requirement I have posted in another question.
see if you can help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.