I have a related problem.
I have a public service desk. On this service desk, the existing JIRA users show up as customers. I can raise a request on behalf of any of these customers through the normal UI.
I also have a web application (a form) which submits requests to JIRA via the API.
It works perfectly except when an existing JIRA User tries to submit a request.
For example, let's say I have a licensed JIRA User (member of jira-users group, with required permissions on service desk) - username peter and email peter@peter.com.
If Peter fills in the form, and provides his email address, my code will try to create a request and will provide the email address in raiseOnBehalfOf field.
The response I get is "Your request could not be created. Please check the fields have been correctly filled in. Please provide a valid value for field 'Raise this request on behalf of'"
I can still use the UI to raise a request on behalf of the user. In both cases, using the UI and API, I have the same credentials so I don't think its a permissions issue.
If we use an entirely different email address, one that is not associated with any JIRA user accounts, say peter1@peter1.com, then the above works and the request and customer are created as expected.
It seems to me that the failure happens when it tries to create a customer and the email address is already in use.
Can anyone help?
@Gregory Joseph, this ticket needs to be reopened. To say that the api doesn't work this way, but not provide a solution for the customer's use case isn't an acceptable resolution.
We're constantly getting this error (Please provide a valid value for field 'Raise this request on behalf of') when users submit support tickets who have submitted ones in the past, as they are now considered "existing users" in Jira. These support tickets are generated via our contact form on our website and mobile apps, so all they provide is an email address, we don't have any sort of "username" for them since many are anonymous users who haven't even created an account with us yet. Jira has the capability to solve this problem (your database stores the user accounts and their email addresses so can map the email address to an existing user), we do not have the capability to solve this problem (we don't know the user account for an email address), so you need to give us a solution.
Here is the code for submitting a support ticket to jira: https://gist.github.com/justintoth/cf0eb315f7e60ee6a4c903df10498175
And here is the error:
error: {"errorMessage":"Your request could not be created. Please check the fields have been correctly filled in. Please provide a valid value for field 'Raise this request on behalf of'","i18nErrorMessage":
{"i18nKey":"sd.validation.request.creation.failure.required.field","parameters":["Please provide a valid value for field 'Raise this request on behalf of'"]}