Thread

Skip Navigation LinksForums > SpiraTeam Forums > SpiraTeam Issues & Questi... > SOAP API - Get tasks of a...

SOAP API - Get tasks of a specific release RSS Feed

Wednesday, May 27, 2015
Hi,

we’re using SpiraTeam 4.2.0.6 and we would like to use the (Java) SOAP API to get all tasks of a specific release. We tried it with the code below, but the filter doesn't work, taskRetrieve() always returns all tasks of all releases. How to get all tasks of a certain release?

ObjectFactory objectFactory;
objectFactory = new ObjectFactory();

RemoteFilter remoteFilter = objectFactory.createRemoteFilter();
remoteFilter.setPropertyName(objectFactory.createRemoteTaskDescription("ReleaseId"));
remoteFilter.setIntValue(objectFactory.createRemoteTaskReleaseId(release.getReleaseId().getValue()));

ArrayOfRemoteFilter remoteFilterArray = objectFactory.createArrayOfRemoteFilter();
remoteFilterArray.getRemoteFilter().add(remoteFilter);

taskArray = this.spiraImportExport.taskRetrieve(remoteFilterArray, remoteSort, 0, Integer.MAX_VALUE);

Regards
Thomas

2 Replies
Jim R.Jim R.
re: Thomas Hein on Wednesday, May 27, 2015
Saturday, May 30, 2015
Hi Thomas

It should work, however you may need to change:

remoteFilter.setPropertyName(objectFactory.createRemoteTaskDescription("ReleaseId"));
to

remoteFilter.setPropertyName("ReleaseId");

Regards
Jim
Thomas HeinThomas Hein
re: Jim R. on Saturday, May 30, 2015
Wednesday, June 24, 2015
Hi Jim,

if I change
        remoteFilter.setPropertyName(objectFactory.createRemoteTaskDescription("ReleaseId"));
to
        remoteFilter.setPropertyName("ReleaseId");

I get the error "incompatible types: String cannot be converted to JAXBElement<String>".

Regards
Thomas

Tagged
Statistics
  • Started: 5/27/2015
  • Last Reply: 6/24/2015
  • Replies: 2
  • Views: 1048
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2016 | Licensed to Inflectra Corporation.