change in response data for custom field

Hello all,

We are using JIRA-rest-java-client-api & core 2.0.0-m31.

Earlier, the custom fields were getting parsed correctly, but suddenly something changed in response data-type, and we started parsing the data improperly. Some parsing logic from JSON data is there in our code.

For e.g.

Before:

Actual JSON object received from Rest client:

{"self":"link_to_self","value":"Target","id":"1111"}

Value obtained by correct parsing based on custom field schema: Target

After:

something changed and our parsing logic failed, and the value obtained as a result of parsing:

{"self":"link_to_self","value":"Target","id":"1111"}

 

We suspect either of the following change happenned on JIRA server side:

  1. Schema/type definition for the custom field that we receive from JIRA server itself has changed.
  2. Earlier, this field was received as a JSON Object, which is now being sent an element in a JSON Array.

 

I tried searching relevant release note in https://developer.atlassian.com/jiradev/latest-updates/preparing-for-jira-7-0/jira-7-0-api-changes but didn't succeed.

Can anyone guide what changed in this case, and how to catch such issue pro-actively. Any link to the relevant documentation would be helpful.

 

Edit on 2015-11-30 12:20 PM IST:

Schema for the customfield earlier:

 

"schema": {
        "type": "array",
        "items": "string",
        "custom": "com.atlassian.jira.plugin.system.customfieldtypes:multiselect",
        "customId": 1234
    }

 

Schema receiving now:

"schema": {
        "type": "array",
        "items": "option",
        "custom": "com.atlassian.jira.plugin.system.customfieldtypes:multiselect",
        "customId": 1234
    }

 

What caused the change in the value of field "items" from "string" to "option"?

1 answer

0 vote

Er, your parsing results have not changed.

What it actually looks like is you've upgraded JIRA from 4.2 - before 4.2, select options were strings, after 4.2, they changed to options.

But Cloud is kept on the latest version at all times, and that's presented select lists as options over REST for many years.

So I think the question is actually what have you changed on your side?

Confirmed that no versions have changed recently. Any specific jar version to check? I found no change in version for httpclient-cache-4.2.1-atlassian-2.jar.

I was referring to the whole of JIRA. If you have not changed the version of JIRA, then there are two other possibilities 1) You have a custom REST add-on which you have changed 2) Your external code that is calling REST has changed

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Fadoua M. Boualem
Published 2 hours ago in Trello

Using Trello to manage events

As a Jira power user, I was at first doubtful that Trello could benefit my workflow. Jira already uses boards (ones you can customize!), so why would I even need to use Trello?! In this post you will...

208 views 3 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you