testcase.getSuccessor() always null.testcase.getSuccessor() always null.https://www.klaros-testmanagement.com/en/c/message_boards/find_thread?p_l_id=11703&threadId=1408292024-03-28T19:52:32Z2024-03-28T19:52:32ZRE: testcase.getSuccessor() always null.Torsten Stolpmannhttps://www.klaros-testmanagement.com/en/c/message_boards/find_message?p_l_id=11703&messageId=1408422013-10-08T15:23:13Z2013-10-08T15:23:13ZSure: context.getActiveProject() is your friend, which documented here: <a href="http://www.klaros-testmanagement.com/files/doc/html/User-Manual.Appendix.Report.html">http://www.klaros-testmanagement.com/files/doc/html/User-Manual.Appendix.Report.html</a><br /><br />In case you have not seen it yet: The example in our <a href="http://www.klaros-testmanagement.com/files/tutorial/html/Report.Tutorial.html">Report Tutorial</a> also uses this method amongst other hopefully useful information.<br /><br />Regards,<br /><br />TorstenTorsten Stolpmann2013-10-08T15:23:13ZRE: testcase.getSuccessor() always null.Fabian Tietzhttps://www.klaros-testmanagement.com/en/c/message_boards/find_message?p_l_id=11703&messageId=1408392013-10-08T15:15:08Z2013-10-08T15:15:08ZOK, i wasn't aware of the fact, that the query executes on all projects, not on the selected one.<br />Is there a way to get the currently active Project from a groovy script?<br /><br />The query below still returns 428 Testcases, the total number shown on the projects page for<br />the "P00001" project is 409. Getting the head revisions works.<br /> <br />I have still several testcases duplicated in the list, both having the same <br />name, shortname and revision now, hence the difference.<br /><br />Regards, <br />Fabian.Fabian Tietz2013-10-08T15:15:08ZRE: testcase.getSuccessor() always null.Torsten Stolpmannhttps://www.klaros-testmanagement.com/en/c/message_boards/find_message?p_l_id=11703&messageId=1408362013-10-08T14:58:20Z2013-10-08T14:58:20ZHi Fabian,<br /><br />your query will indeed return a list of all test case revisions <strong>in all projects</strong>. I see no reasons why this behavior should have changed for 3.8.2.<br /><br />It is probably a good idea to use a where clause like shown below:<br /><br /><span style="font-family: Times New Roman">select tc from KlarosTestCase tc where tc.configuration.name='P0001' and tc.successor is null</span><br /><br />Hope this helps.<br /><br />Regards,<br /><br />TorstenTorsten Stolpmann2013-10-08T14:58:20Ztestcase.getSuccessor() always null.Fabian Tietzhttps://www.klaros-testmanagement.com/en/c/message_boards/find_message?p_l_id=11703&messageId=1408282013-10-08T14:35:16Z2013-10-08T14:35:16ZHi,<br /><br />it seems testcase.getSuccessor always returns null with the Version 3.8.2 - Build 66 (2013-09-12 13:26:53)<br />I think this was working before, with the older build we previously tested.<br /><br />StringBuffer query = new StringBuffer();<br />query.append("select tc from KlarosTestCase tc");<br />List<KlarosTestCase> alltc = context.executeQuery(query.toString());<br />alltc=alltc.findAll { ((it.name == "TC00004") &&(it.getSuccessor()==null)) };<br /><br />alltc still contains a list of all revisions for this Testcase.<br /><br />Regards,<br /><br />Fabian.Fabian Tietz2013-10-08T14:35:16Z