-
Type:
Bug
-
Resolution: Answered
-
Priority:
Medium
-
None
-
Affects Version/s: 2.0
-
Component/s: Core - Content REST APIs
-
Environment:
Java, uUsing xmlrpc-client-3.0.jar against a JIRA installation of version 3.5.x
Hi,
I want to automatically change the state of an issue from 'OPEN' to 'RESOLVED' (or back) depending on
the results of my JUnit framwork.
Im' using the XML-RPC interface and everything works fine, except the 'status' parameter does not update.
I'm printing the issue in question, before I run this method:
{created=2006-09-07 13:06:22.395, summary=summary bla, type=1, environment=all, affectsVersions=[Ljava.lang.Object;@131f71a, status=3, updated=2006-09-08 07:25:44.602, id=14073, key=RSJMS-201, components=[Ljava.lang.Object;@15601ea, fixVersions=[Ljava.lang.Object;@197d257, description=resolved by BugUnit, customFieldValues=[Ljava.lang.Object;@7259da, project=RSJMS, reporter=axel.podehl@codestreet.com, votes=0, assignee=axel.podehl@codestreet.com}status=3 -> inprogress
public Map updateIssueStatus(String id, int status, String description) throws XmlRpcException
{ Vector params = new Vector(); params.add(loginToken); params.add(id); // 3rd argument Map issue = new Hashtable(); //getIssue(id); issue.put("status", makeVector( Integer.toString(5) ) ); //if( status==this.STATUS_RESOLVED ) //issue.put("resolution", makeVector( "1") ); issue.put("description", makeVector( "ABCDEF" ) ); params.add(issue); Object o = rpcClient.execute("jira1.updateIssue", params ); if( o instanceof XmlRpcException ) throw (XmlRpcException)o; if( o==null ) return null; return (Map)o; }And after: the description has changed (as I would expect), but the status is still the same !!!
{created=2006-09-07 13:06:22.395, summary=summary bla, type=1, environment=all, affectsVersions=[Ljava.lang.Object;@1add2dd, status=3, updated=2006-09-08 07:26:09.805, id=14073, key=RSJMS-201, components=[Ljava.lang.Object;@eee36c, fixVersions=[Ljava.lang.Object;@194df86, description=ABCDEF, customFieldValues=[Ljava.lang.Object;@defa1a, project=RSJMS, reporter=axel.podehl@codestreet.com, votes=0, assignee=axel.podehl@codestreet.com}status=3 -> inprogress