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

Update a custom field using REST?

Wim Deblauwe
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 11, 2011

Hi,

is it possible to update a custom field using REST ? I want to integrate JIRA with an external system (LiquidPlanner) and it is very easy using their REST api to keep a reference to JIRA, but I need to do the reverse as well (keep track of the LP id in JIRA). If that would work, it would only work on issue level. I also need a solution for something like that on project level and version level. Is there such a thing ?

regards,

Wim

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
Bob Swift (personal)
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 11, 2011

JIRA Command Line Interface : jira --action setFieldValue --issue xxx-1 --field field1 --value value1

Wim Deblauwe
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 11, 2011

I was hoping for something I can do in groovy directly, but would be great workaround

JamieA
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 11, 2011

To augment Bob's answer, you can't do it using REST. The JIRA REST API is pretty much read-only at the moment (4.3). Soap is the way to go...

Bob Swift (personal)
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 12, 2011

We use Groovy for all our integrations and run the CLI commands as part of that - it is easier to do and helps test/debug your automation.

0 votes
Andy Brook [Plugin People]
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 12, 2011

Groovy? not sure. As Jamie says, the REST api's tend to be readonly (see http://docs.atlassian.com/jira/REST/latest/ for details). Writing a Java REST plugin is what I'd think you'd need, a few lines of (java) code, use issue key as a path arg, lookup availabel CF's, locate the one you want, update the value. You'd need to replicate features accross different data types as required.

JamieA
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 12, 2011

You can use groovy anywhere you'd use java... groovy plugins ftw. Think Wim is writing something client-side though...

Wim Deblauwe
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 12, 2011

Indeed, I am for the moment just writing a stand-alone program in groovy that connects to JIRA using the REST API and copies things to LiquidPlanner. So it is mostly read from JIRA right now.

TAGS
AUG Leaders

Atlassian Community Events