I’ve created an issue field using “jiraIssueFields” module. I set it required in “Field configurations”, and added it to a transition screen that I show when the issue is done.
My problem is that while creating an issue, even though the field is not even shown on “Issue create” screen, I still get an error saying that the field is required.
If the field is required, it needs to be set on the issue in all states. You can add it to the issue creation screen to be able to set it when creating new issues.
If you want a field to be required AT ALL TIMES, you should mark it required in the Field Configuration. This appears to be what you’ve done.
If you want a field to be required FOR A SPECIFIC ACTION/TRANSITION, you should mark it required using a Workflow Validator. This is what you are looking for.
I like you reply but it doesn’t give me any further information.
I didn’t change the default configuration and it’s on cloud.
The only solution I had was to go to this field (already removed from my screen scheme) and to remove required field set on it to no longer be disturbed. I’m using JIRA for many years and this is a defect or an unexpected behavior as a normal user. Everybody is not expert and should be able to use it normally.
If you can give more information or links at your answer it would be nice.
Thanks
The instructions are clear. But it still seems like a bug. I mean - it’s strange to require something that is not on the screen.
It’s not expected from admin point of view, and it causes a faulty user experience if the admin made a mistake. I think the issue here is that it is at all possible to create this issue from GUI - why not add an “IF”:
Look – Both use-cases are supported. If you want a field to be always required, then use a Field Configuration. If you want a field to be required during a workflow action, use a Validator.
Adding more conditional logic would make Jira MORE complex to develop against, and it would only protect administrators who don’t know those two basic use-cases. I’d prefer concrete mechanisms, but this is MY opinion, and I recognize that not everyone may share it.
From the user experience perspective, I must agree with @roman2. It is not natural/expected to require a field that is not visible. I was surprised by that behavior a few times.
Fortunately, Jira provides a workaround in the form of validator as pointed out by @sfbehnke.