<rss version="2.0" xmlns:a10="http://www.w3.org/2005/Atom"><channel><title>Inflectra Customer Forums: Test Cases Counts per Portfolio  (Thread)</title><description> Hi,   Is it possible to count the all the created Test Cases per potfolio using ESQL from Edit Reports on SpiraPlan?      Thank you.  </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/spirateam/issues-questions/3065.aspx</link><item><guid isPermaLink="false">threadId=3065</guid><author>LANCE JEWEL JAVIER (lance.javier@metrobank.com.ph)</author><title>Test Cases Counts per Portfolio </title><description> Hi,   Is it possible to count the all the created Test Cases per potfolio using ESQL from Edit Reports on SpiraPlan?      Thank you.  </description><pubDate>Thu, 17 Jul 2025 08:35:21 -0400</pubDate><a10:updated>2026-03-30T08:31:16-04:00</a10:updated><link>/Support/Forum/spirateam/issues-questions/3065.aspx</link></item><item><guid isPermaLink="false">messageId=7347</guid><author>Mario Clemons (manuelmassey632@gmail.com)</author><title> Yes, it is  possible  to count  all the created Test Cases per Portfolio  in  SpiraPlan  using  ESQ</title><description> Yes, it is  possible  to count  all the created Test Cases per Portfolio  in  SpiraPlan  using  ESQL (Enterprise SQL)  from the  Edit Reports  section.  You can write an  ESQL query  that:    Counts all test cases.    Groups them by  Product  (aka Project in SpiraPlan).    If your Portfolios are structured using  Product Groups  (which is SpiraPlans way of grouping products into Portfolios), then you can  join across tables  to get counts per Portfolio.   </description><pubDate>Tue, 05 Aug 2025 03:38:09 -0400</pubDate><a10:updated>2025-08-05T03:38:09-04:00</a10:updated><link>/Support/Forum/spirateam/issues-questions/3065.aspx#reply7347</link></item><item><guid isPermaLink="false">messageId=7349</guid><author>Victoria D (nino.diasamidze@inflectra.com)</author><title> Hello,  Yes, that can be done for sure. Here is the sample query that counts test cases by portfoli</title><description> Hello,  Yes, that can be done for sure. Here is the sample query that counts test cases by portfolio.   SELECT COUNT(TC.[TEST_CASE_ID]) AS TEST_CASE_COUNT, 
       PF.[PORTFOLIO_ID]
       --,PG.PROJECT_GROUP_ID AS PROGRAM_ID, TC.PROJECT_ID
FROM SpiraTestEntities.R_TestCases AS TC
INNER JOIN SpiraTestEntities.R_ProjectGroups AS PG ON PG.[PROJECT_GROUP_ID] = TC.PROJECT_GROUP_ID
INNER JOIN SpiraTestEntities.R_Portfolios AS PF ON PG.PORTFOLIO_ID = PF.PORTFOLIO_ID
GROUP BY PF.[PORTFOLIO_ID]
                --,TC.[PROJECT_GROUP_ID], 
		--,PG.PROJECT_GROUP_ID
		--,TC.PROJECT_ID
   If you remove the comment symbols for lines 3, 8,9 and 10 then the output will display also an ID or the product and program test cases belong to. Here you can find more details about how to manage portfolios:  https://spiradoc.inflectra.com/Spira-Administration-Guide/System-Workspaces/#viewedit-portfolios   Hope that helps.     Regards, Victoria - </description><pubDate>Wed, 06 Aug 2025 10:38:54 -0400</pubDate><a10:updated>2025-08-06T10:38:54-04:00</a10:updated><link>/Support/Forum/spirateam/issues-questions/3065.aspx#reply7349</link></item><item><guid isPermaLink="false">messageId=7388</guid><author>James Patton (james598patton@www-ipass.com)</author><title>  Yes, its possible using ESQL in Edit Reports. You can group by PortfolioId and count TestCaseId to</title><description>  Yes, its possible using ESQL in Edit Reports. You can group by PortfolioId and count TestCaseId to get totals per portfolio. Make sure your report joins the relevant tables like TestCases, Projects, and Portfolios.     </description><pubDate>Thu, 25 Sep 2025 11:33:07 -0400</pubDate><a10:updated>2025-09-25T11:52:39-04:00</a10:updated><link>/Support/Forum/spirateam/issues-questions/3065.aspx#reply7388</link></item></channel></rss>