Changes between Version 9 and Version 10 of TestManagerForTracPluginApi


Ignore:
Timestamp:
Dec 27, 2010 2:30:54 AM (4 years ago)
Author:
seccanj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TestManagerForTracPluginApi

    v9 v10  
    162162 
    163163TODO: To be described. 
     164 
     165== Getting all the Tickets related to a Test Case == 
     166 
     167You now have the ability to programmatically get all of the tickets that have been (explicitly) opened against a test case. 
     168 
     169From a TestCase object, you can list the tickets opened against it in any test plan. 
     170 
     171From a TestCaseInPlan object, you can list the tickets opened against the test case in the specific plan. 
     172 
     173{{{ 
     174from testmanager.model import TestCase, TestCaseInPlan 
     175 
     176tc = TestCase(self.env, id, path) 
     177for t in tc.get_related_tickets(): 
     178    result += str(t) + ', ' 
     179 
     180tc = TestCaseInPlan(self.env, id, planid, path) 
     181for t in tc.get_related_tickets(): 
     182    result += str(t) + ', ' 
     183}}} 
     184 
     185This is achieved by adding two custom fields to the ticket object, named 'testcaseid' for the test case ID, and 'planid' for the test plan ID.