Hi all,
I have a custom field that's required in field configuration of the issue type.
This custom field hasn't a default value, because users are of two type:
So I created a postfunction in the create transition of the issue.
The postfunction is BEFORE the "Creates the issue originally" step!
Based on the reporter of the issue, the postfunction set a default value for the custom field or leave it null.
So If the reporter must choose a value, if he doesn't enter a value, the creation fails [OK]
If the reporter must have the same value for the CF, the creation fails with the message:
"There were some errors when trying to create this issue" [CF] is required
What I'm wrong???
I have to store the value in the posftunction in some way? (I only use the method "issue.setCustomFieldValue(cField, value);" )
Thanks in advance
Community moderators have prevented the ability to post new answers.
When a transition runs, JIRA runs through the process in this order:
Your setup is "field is mandatory", which is checked in step 4. So what you're doing "wrong" is not entering the value for the field when it is required.
Your best bet is probably to make the field optional. Then iwhen someone leaves it blank, it will pass validation and the post-function can run. You could even add a validator to check their input too
Thanks a lot... but the must annoying thing is that, if a CF is optional (in my case the CF is a radio button), in the screen is showed the option "None".... :-S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How else are you going to leave it empty? There has to be an option for a user to clearly see means "empty"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.