<rss version="2.0" xmlns:a10="http://www.w3.org/2005/Atom"><channel><title>Inflectra Customer Forums: Apply RemoteFilter to the CustomProperty of a TestCase (Thread)</title><description>&#xD;
Hello everyone, I'm working with SOAP  API   V4.0 and trying to retrieve some TestCases with the specified CustomProperty (Integer, named "xls_row"). Here is my code    (C#) :             RemoteFilter[] filter = { new RemoteFilter() };             filter[0].PropertyName = "xls_row";             filter[0].IntValue = 46;             RemoteTestCase[] casesFound = spiraImportExport.TestCase_Retrieve(filter, 1, 2);  But, surprisingly, the RemoteFilter does not work as expected. Even the function TestCase_Retrive(...) from which I expected the return as an array with the maximal length = 2 does not work as it described in documentation (https://www.inflectra.com/SpiraDemo/Services/v4_0/ImportExport.aspx?operation=TestCase_Retrieve). It returns the array with the length 172 (it is the same in case if the RemoteFilter parameter is null).   Is there any way to retrieve TestCases filtered by the value of some CustomProperty? And why I get 172 rows when it was only 2 required by the parameter?   Thank you in advance.  Maxim.   &#xD;
&#xD;
</description><language>en-US</language><copyright>(C) Copyright 2006-2026 Inflectra Corporation.</copyright><managingEditor>support@inflectra.com</managingEditor><category domain="http://www.dmoz.org">/Computers/Software/Project_Management/</category><category domain="http://www.dmoz.org">/Computers/Software/Quality_Assurance/</category><generator>KronoDesk</generator><a10:contributor><a10:email>support@inflectra.com</a10:email></a10:contributor><a10:id>http://www.inflectra.com/kronodesk/forums/threads</a10:id><ttl>120</ttl><link>/Support/Forum/spiratest/issues-questions/1500.aspx</link><item><guid isPermaLink="false">threadId=1500</guid><author>Maxim Baryshnikov (maxim.baryshnikov@siemens.com)</author><category domain="http://www.inflectra.com/kronodesk/thread/tag">filtering</category><category domain="http://www.inflectra.com/kronodesk/thread/tag"> api</category><title>Apply RemoteFilter to the CustomProperty of a TestCase</title><description>&#xD;
Hello everyone, I'm working with SOAP  API   V4.0 and trying to retrieve some TestCases with the specified CustomProperty (Integer, named "xls_row"). Here is my code    (C#) :             RemoteFilter[] filter = { new RemoteFilter() };             filter[0].PropertyName = "xls_row";             filter[0].IntValue = 46;             RemoteTestCase[] casesFound = spiraImportExport.TestCase_Retrieve(filter, 1, 2);  But, surprisingly, the RemoteFilter does not work as expected. Even the function TestCase_Retrive(...) from which I expected the return as an array with the maximal length = 2 does not work as it described in documentation (https://www.inflectra.com/SpiraDemo/Services/v4_0/ImportExport.aspx?operation=TestCase_Retrieve). It returns the array with the length 172 (it is the same in case if the RemoteFilter parameter is null).   Is there any way to retrieve TestCases filtered by the value of some CustomProperty? And why I get 172 rows when it was only 2 required by the parameter?   Thank you in advance.  Maxim.   &#xD;
&#xD;
</description><pubDate>Mon, 18 Jul 2016 11:15:54 -0400</pubDate><a10:updated>2016-07-18T14:04:22-04:00</a10:updated><link>/Support/Forum/spiratest/issues-questions/1500.aspx</link></item><item><guid isPermaLink="false">messageId=2695</guid><author>Maxim Baryshnikov (maxim.baryshnikov@siemens.com)</author><title>&#xD;
OK, I found some "nasty" workaround to retrieve TestCase with CustomProperty  named 'propertyName'</title><description>&#xD;
OK, I found some "nasty" workaround to retrieve TestCase with CustomProperty  named 'propertyName' and has the value 'propertyValue':  int rowsCount =  (int) spiraImportExport.TestCase_Count(null);  var casesFound = spiraImportExport.TestCase_Retrieve(null, 1, rowsCount);   var casesExceptFolders = casesFound.Where(                  somecase =&gt; !somecase.Folder             );             var caseWithRequiredID = casesExceptFolders.Where(                 somecase =&gt; somecase.CustomProperties.Any(                     property =&gt;                          property.Definition.Name == propertyName  &amp;&amp;                         property.IntegerValue == propertyValue                 )                 ); But, I'm still wondering if there is some tool in SOAP API for that...  Also, it seems that the TestCase_Retrieve(..) always returns all TestCase folders in the project, am I right?&#xD;
&#xD;
</description><pubDate>Mon, 18 Jul 2016 14:04:22 -0400</pubDate><a10:updated>2016-07-18T14:04:22-04:00</a10:updated><link>/Support/Forum/spiratest/issues-questions/1500.aspx#reply2695</link></item></channel></rss>