Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

SOAP script broken after JIRA 5 upgrade

Paul Stahlke
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 25, 2012

When we upgraded from JIRA 4.4.4 to 5.0.7, our script broke. The lookup for a cascading select custom field value is returning the ID now instead of the Value. Does anyone know how to fix this?

I think the problem is here:

my @cfs=("customfield_10459","customfield_10458","customfield_10741","customfield_10031","customfield_10060","customfield_10451");

my $values = $jira->get_issue_custom_field_values($issue,@cfs);

We tried to extract the values for 'customfield_10451' which is a cascading select field, it used to be a string value(e.g. “New York”), now became an internal ID (e.g. 11771).

'customfieldId' => 'customfield_10451',

'values' => [

'11771'

],

'key' => undef

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Paul Stahlke
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 1, 2012

We decided to use the REST API for resolve this.

1 vote
Tom Towkach July 26, 2012

You may be hitting an improve to JIRA. JIRA is now storing the option ids instead of option name. This was changed to introduce option renaming.

Have a look at the customfieldoption table to find the String value for that option using the id you got from customfieldvalue table.

I thought this change was released in 4.4.4 already, but check that table to see if you see your values. If they are now then you'll have to get the value for that option from that table.

Paul Stahlke
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 27, 2012

Yes, that is the case. So how do I pull in the value instead on a soap call?

Tom Towkach July 27, 2012

That's a good question. Starting in JIRA 5.0, the REST API became the recommened and supported remote API for JIRA. REST is where Atlassian is adding functionality to the remote API (https://developer.atlassian.com/display/JIRADEV/Creating+a+JIRA+SOAP+Client) . Your SOAP script will continued to be supported, but probably if you want an api call to to get that value for you, I'm guessing, it wont be there in the SOAP remote API. It might in the REST API. You could switch to REST and use that or stick with your SOAP script. If there is no api call for you to use, then your script will have to query the database and do the join to the customfieldoption table as I mentioned above.

TAGS
AUG Leaders

Atlassian Community Events