Thread

Skip Navigation LinksForums > SpiraTest Forums > SpiraTest Issues & Questi... > MultivalueFilter is not w...

MultivalueFilter is not working RSS Feed

Thursday, March 24, 2016
Hi,

I am trying to filter test runs based on some test set ids. I have created a multivalue filter for that based on some examples I found in the internet.But while retrieving, this filter is not working. Single value filter is working fine.I have pasted the code for multivalue filter below :

<code>
      List<RemoteFilter> remoteFilters = new ArrayList<RemoteFilter>();
      RemoteFilter remoteFilter = new RemoteFilter();
      MultiValueFilter multiFilter = new MultiValueFilter();
      multiFilter.setIsNone(false);
      multiFilter.setValues(new int[] {59313,59323});
      remoteFilter.setPropertyName("TestSetId");
      remoteFilter.setMultiValue(multiFilter);
      remoteFilters.add(remoteFilter);
      RemoteFilter remoteFilterArray[] = new RemoteFilter[remoteFilters.size()];
      RemoteTestRun[] nextChunk = spira.testRun_Retrieve(remoteFilterArray, new RemoteSort(), rowNum, chunkSize); 
</code>

If you find anything wrong with the code or anything I am doing wrong then let me know.

Thanks.

5 Replies
Sarah T.Sarah T.
re: Abhijit Banerjee on Thursday, March 24, 2016
Friday, March 25, 2016
Hi Abhijit

For the TestSetId field I would instead use the IntValue filter:

      List<RemoteFilter> remoteFilters = new ArrayList<RemoteFilter>();
      RemoteFilter remoteFilter = new RemoteFilter();
      remoteFilter.setPropertyName("TestSetId");
      remoteFilter.setIntValue(59313);
      remoteFilters.add(remoteFilter);
      RemoteFilter remoteFilterArray[] = new RemoteFilter[remoteFilters.size()];
      RemoteTestRun[] nextChunk = spira.testRun_Retrieve(remoteFilterArray, new RemoteSort(), rowNum, chunkSize); 

Regards
Sarah
Abhijit BanerjeeAbhijit Banerjee
re: Sarah T. on Friday, March 25, 2016
Friday, March 25, 2016
Hi Sarah,

Thanks for your reply. 
So if there is multiple test set ids then what I am supposed to do. One way is to loop through the TestSetIds and then retrieve the test cases using single value filter. 
But I just wanted to know whether multi value filter is not working me only or it is not working for everyone or am I missing something. I'll be very glad if someone can guide me through.

Thanks,
Abhijit 
Adam SAdam S
re: Abhijit Banerjee on Friday, March 25, 2016
Friday, March 25, 2016
Hi Abhijit

For the test set field you cannot use a multi-value filter I'm afraid, you'd have to loop and query for each one and then aggregate the results.

Regards
Adam
Abhijit BanerjeeAbhijit Banerjee
re: Adam S on Friday, March 25, 2016
Tuesday, March 29, 2016
Hi Adam,

It's not just Test Set Ids , for Test Case Ids also it is not working. The project I am working on is pretty big , so calling web service more than once is not feasible in terms of cost.
I guess there is some issue with this MultiValue Filter. If you can check and fix it then it'll be very helpful.

Thanks,
Abhijit
Adam SAdam S
re: Abhijit Banerjee on Tuesday, March 29, 2016
Tuesday, March 29, 2016
Hi Abhijit

We have logged it in our enhancement tracker, and it will added in the future. However I do not have a definite timeline.

Regards

Adam
Statistics
  • Started: 3/24/2016
  • Last Reply: 3/29/2016
  • Replies: 5
  • Views: 261
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2016 | Licensed to Inflectra Corporation.