Please see attached screenshots. For some reason the error message generated by the Behaviour on the Fund(s) field is not displayed with that field, but at the bottom of the Edit dialog. Any suggestions how to get it to display right below the Fund(s) field please?
Also, for some reasons a leading colon (:) is being inserted at the beginning of the error message, any ideas why?
@PD Sheehan I see you've solved a couple of similar behaviours questions before, could you possibly help me with this one please?
Thanks!
I would suggest also examining the api calls from your browser development panel.
Look at the response from GET: validators.json
Then look at the payload and response from POST: runvalidator.json
You might be able to find some clues there.
Thanks @PD Sheehan, please see screenshots below. I've never looked at the dev console before so please forgive me if I'm asking basic questions. The first screenshot appears to show the validators that were loaded for the field when the edit screen first loaded. The second I think shows what happened when I entered the bad value in the field. Does this offer any clues? If there some sort of a conflict between the Behaviour response and the I18N response (whatever that is)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see nothing abnormal there.
More importantly, it's clear that the helptext doesn't include the (:).
The only other thing I can think of is to check your "configure field" option on the screen and make sure you have ShowFields = All. I've seen behavior misbehaving (ha!) when custom field selections have been made.
If that's the case and this fix your issue, I'd recommend you report it to Adaptavist Support.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OMG that was it! Eureka! You're a genius @PD Sheehan!
Do you know if all users would need to set their "configure field" option like this individually, or this is a one-time admin setting?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately, that's every user.
It used to be that those validation errors would go completely unnoticed and behaviour was unable to prevent submitting the form if errors were present on hidden fields.
So perhaps they've made some inroads into fixing that, but that causes the message to not be placed against the correct field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your field has got brackets in its name, which are special characters. Without having tested it, I'd suggest to get the field by ID instead of getting it by name, try:
def fundsField = getFieldById("customfield_nnnn")
replace nnnn with the id of your custom field
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah, I'd try this first.
This is not a situation I've seen directly. My guess would be that perhaps you have 2 fields with the same name and behavior is picking the wrong one.
Though before, in the situation where the field that the error is set on is visible on the screen, my experience was that the error was simply not displayed. Perhaps things have changed with newer versions of scriptrunner.
The other thing I'd say is that I don't think you'll be able to pick up "Please select..." in fundsField.value. I expect the value will be null if you haven't selected anything.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nevermind that last point... I see you have an actual option called Please Select.
Do you perhaps have another behavior configuration that tried to do the same thing?
I'm wondering where the ":" colon is coming from in
:Remove the "Please Select.." option
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you @Leonard Chew and @PD Sheehan for your suggestions, but unfortunately no luck.
I tried getFieldByID, exact same result. I also tried renaming the field to remove the parenthesis, also no luck.
I don't have any other Behavious on that field either.
As you noted @PD Sheehan, 'Please select..." is a defined option in that multi-select list (it's the default option, so that the field is always displayed on the View screen).
Any other thoughts?
Thanks.
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.