Please provide a valid value for field 'Raise this request on behalf of' Error

Justin Toth November 19, 2017

On my website I have a contact form which when submitted, creates a new service desk ticket. It makes the following rest api call:

https://jira-housters.atlassian.net/rest/servicedeskapi/request (with appropriate Accept and Authorization request headers)

{
"serviceDeskId": "1",
"requestTypeId": "1",
"requestFieldValues": {
"summary": "Housters Contact from Justin Test (Web)",
"description": "test message"
},
"raiseOnBehalfOf": "myemail@mydomain.com"
}

Before this worked completely fine, however a few days ago it started erroring:

{"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'"]}}

This makes no sense, as it's complaining about the raise request on behalf of field when I clearly have it specified. What gives?

1 answer

0 votes
Eduard M
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 23, 2017

Hello Justin,

According to the comments in the bug report (which is for another question but the comments from 26/Jan/2017 also address your question):

https://jira.atlassian.com/browse/JSDSERVER-3398

the accepted values are either email for non-existing user, OR, a user name for an existing user, the reason being given that we can't look up users by email, only by user name.

Can you review and let me know if that explanation makes sense?

Justin Toth November 25, 2017

I think you're on to something there. Unfortunately, I'm not sure how to resolve the issue.

When our contact form is submitted, it calls this api method and sets raiseOnBehalf to their email address from the contact form. If the email address doesn't exist in jira then it succeeds in creating the support ticket in service desk and creates a user account with their email address. We never set a username for the user when calling the api, nor do we have a username for them necessarily (as anonymous users may want to contact us too), and also even if we do have a username for them then it's an email address.

So basically, to ask us to pass in a username that we have no knowledge of doesn't get us anywhere.

Eduard M
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 27, 2017

Hi Justin,

If I understand correctly, your usernames are their email addresses? Are you using a pre-populated forms with these values? 

Is there any error in the jira logs related to the form failing to submit?

As a test, what if you create a user with a non-email username and try to submit a request on their behalf? It would clarify the use case if you see that working, but not working when the username is their email.

Justin Toth November 27, 2017

Correct, the usernames are email addresses, however a user doesn't necessarily have a user account with us when contacting us. We pre-populate their email address in the contact us form if they're logged in, but they can always change it.

 

I think maybe this was an intermittent bug service desk. This started erroring without us making any code changes, then after a few days it started working again. So I think all is good, will revisit if the error comes back. Thanks for the help!

Suggest an answer

Log in or Sign up to answer