JIRA SOAP API questions

This question is a copy of :https://support.atlassian.com/browse/JSP-134877

Support adviced me to post it here too.

Anyone can help (expecially for the first question)?

-----------------

Hi,
I'm running JIRA v4.2.4-b591#591.
I developed a Python script using SOAP API (suds) to connect to JIRA.

I have some questions I hope you can answer:
1) [the most important one]: how do you update an Affected Versions?

The following calls are perfectly working:

updateIssue("XXX-YY", [{"id":"priority", "values":[NNN]}])
updateIssue("XXX-YY", [{"id":"components", "values":[NNN]}])
updateIssue("XXX-YY", [{"id":"fixVersions", "values":[NNN]}])

Instead, the following ones are not working (and they don't throw any exception):

updateIssue("XXX-YY", [{"id":"affectsVersions", "values":[NNN]}])
updateIssue("XXX-YY", [{"id":"whatever", "values":[NNN]}])

2) Despite the documentation (http://docs.atlassian.com/rpc-jira-plugin/latest/com/atlassian/jira/rpc/soap/JiraSoapService.html) I could find out, by chance, other "hidden" methods like:

  • getIssueLinks(key)
  • getTransitions(key)
  • getHistory(key)
    Is there a way to retrieve "Labels" too? (of course I tried the obvious one [getLabels(key)] which didn't work)

3) Referring to point 2), I'm able to retrieve links, but I don't get the 'timestamp' or the 'author' (like it's happening with "getComments(key)" for example). Is there a way to retrieve those missing informations?

4) Again about "Links", is there a way to add or remove links?
With "Labels", for example, I could use the following trick:

updateIssue("XXX-YY", [{"id":"labels", "values":["A", "B", "C"]}])
updateIssue("XXX-YY", [{"id":"labels", "values":[]}])

Thanks a lot for your time,
Marco

4 answers

1 accepted

JIRA Command Line Interface has support in some of these areas. Look through Documentation for specifics.

Thanks Bob,
that was helpful...

Can you please confirm that addLabels/removeLabels are not implemented in 4.2?

Those should work on 4.2 I think - code says minimum of 4.2 though. Just don't test there any more :).

> jira -s http://vlieg.intra.local/rpc/soap/jirasoapservice-v2?wsdl -u xxxx -p XXXXXX --action addLabels --issue "AAAA-11" --labels "whatever"

Remote error: Invalid data returned on REST request. Unexpected character (<) at position 0.

What I'm doing wrong?

PERFECT! :)

Thanks a lot...

Use -s http://vlieg.intra.local , the client handles the service stuff.

  • Regarding question 1, can you give me an actual coding example of what you've used in the past apart from "NNN" for affectsVersions? Can you please do the same thing for fixVersions?
  • Any luck with increasing the log level for SOAP to DEBUG?
  • Have you checked your XML output to see what methods are accepted? For example: https://jira.atlassian.com/rpc/soap/jirasoapservice-v2?wsdl</li<>>

Hi Dennis,
thanks for your quick reply.

About question #1, the problem was in the name, not in the actual data passed. I knew that but I could not found out the correct name. Now I know: it's just "versions" :)

About the other questions, browsing the XML link you gave me, it's clear enough that there is nothing that can be used to retrieve labels or any extra information about links. Thanks, that was helpful although not solving my problem.

Cheers,
Marco

Ok, it took some time but I managed to find out the solution myself.
The correct name for the first question is "versions"

I feel pessimistic about the remaining questions...

This thread can be closed...

Thanks a lot for your answer, it really helped!

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
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

244 views 1 18
Join discussion

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