Custom URL field throwing error from API

Josey Morton
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 19, 2018

I'm working on a syncing script between our organizations GitHub and Jira accounts, and issue creation is happening until I include the custom field that references the GitHub issue.

 

{ 
"labels": [],
"project": { "id": "10000" },
"priority": { "name": "Medium" },
"description": { "type": "doc", "content": [ { "type": "paragraph", "content": [ { "type": "text", "text": "..." } ] } ], "version": 1 },
"issuetype": { "id": "10002" },
"components": [],
"summary": "Github Title",
"assignee": { "name": "Github/Jira user association" },
"customfield_10021": { "value": "https://github.com/org/repo/issues/1" }
}

 

The custom field I have linked to these issues is confirmed and works within the interface, but when I submit via the v3 rest API I get the following error response:

{ 
errorMessages: [],
errors: { customfield_10021: 'Not a valid URL' }
}

 I've tried all variations of the custom field I could think of (mainly the above, and passing a regular string, which tells me it needs to be an object).

These API errors and documentation really seems lacking in clarity...

1 answer

0 votes
Matthieu Calie
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 12, 2019

I am having the exact same problem here. Trying to set a customfield with type url and i cannot seem to find how to pass the value. If you pass a string the error reads: "Opeartion value must be an object".

If I pass in an object with the "value" key, it states: "Not a valid URL"

Is there any solution for this?

 

According to the docs:

image.png

Josey Morton
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 12, 2019

I wouldn't get your hopes up too high for a response. I've asked on here and via email to support and have been ignored completely.

 

I've since given up on the project I was working on because this was a complete blocker.

Matthieu Calie
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 15, 2019

Hi @Josey Morton. I contacted customer support and they ignored my remark that there was a bug by hinting that they don't support custom development.

There is clearly a bug with customfields in the API V3. I tried the same with a simple text field and had the same error message ("Opeartion value must be an object").

My issue got solved by using V2 (which is marked `stable`) instead of v3 (marked `beta`). 

It is a pity that Atlassian support dit not admit it that there is a bug in their `beta`version of api v3. I mean it is marked beta, so you could admit it...

Like Dimitrios Moschovitis likes this

Suggest an answer

Log in or Sign up to answer