MultivalueFilter is not working

Thursday, March 24, 2016
Avatar
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
Friday, March 25, 2016
Avatar
inflectra.sarahx
re: abanerjee Thursday, March 24, 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
Friday, March 25, 2016
Avatar
re: inflectra.sarahx 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 
Friday, March 25, 2016
Avatar
re: abanerjee 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
Tuesday, March 29, 2016
Avatar
re: inflectra.david Friday, March 25, 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
Tuesday, March 29, 2016
Avatar
re: abanerjee 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

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Thursday, March 24, 2016
  • Last Reply: Tuesday, March 29, 2016
  • Replies: 5
  • Views: 10610