Page 1 of 1

Fault: Invalid custom field value for field id 27

Posted: 22 Aug 2023, 02:44
by karta88821
I used the Mantis soap api to create new issue.
I got this error "Fault: Invalid custom field value for field id 27" while creating a new issue with custom fields.
But I have no ideas why the value of this field is invalid.

Here is content of custom_fields:

Code: Select all

'custom_fields': [
    'field': {
        'id': 27,
        'name': 'Site'
    },
    'value': u'MY_SITE'
]


Please give me some ideas, thanks!

Re: Fault: Invalid custom field value for field id 27

Posted: 22 Aug 2023, 12:22
by JulesA
Hello,

why is there an extra "u" ?
'value': u'MY_SITE'
instead of just
'value': 'MY_SITE'
Kind regards

Jules

Re: Fault: Invalid custom field value for field id 27

Posted: 23 Aug 2023, 01:25
by karta88821
Hi, Jules:
This json string is generated by json.loads() which is the json decoder in python.
The prefix 'u' means this string is a unicode string.

BR,
Daniel