zentaobiz.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * 展示Bug列表的相关变量。
  4. * Show the bug list related variables.
  5. *
  6. * @param object $execution
  7. * @param object $project
  8. * @param int $productID
  9. * @param string $branch
  10. * @param array $products
  11. * @param string $orderBy
  12. * @param string $type
  13. * @param string $build
  14. * @param int $param
  15. * @param array $bugs
  16. * @param object $pager
  17. * @access protected
  18. * @return void
  19. */
  20. protected function assignBugVars($execution, $project, $productID, $branch, $products, $orderBy, $type, $param, $build, $bugs, $pager)
  21. {
  22. parent::assignBugVars($execution, $project, $productID, $branch, $products, $orderBy, $type, $param, $build, $bugs, $pager);
  23. $executionBugs = $this->view->bugs;
  24. $bugRelatedObjectList = $this->loadModel('custom')->getRelatedObjectList(array_keys($executionBugs), 'bug', 'byRelation', true);
  25. foreach($executionBugs as $bug) $bug->relatedObject = zget($bugRelatedObjectList, $bug->id, 0);
  26. $this->view->bugs = $executionBugs;
  27. }
  28. /**
  29. * 展示用例列表的相关变量。
  30. * Show the case list related variables.
  31. *
  32. * @param int $executionID
  33. * @param int $productID
  34. * @param string $branchID
  35. * @param int $moduleID
  36. * @param int $param
  37. * @param string $orderBy
  38. * @param string $type
  39. * @param object $pager
  40. * @access protected
  41. * @return void
  42. */
  43. protected function assignTestcaseVars($executionID, $productID, $branchID, $moduleID, $param, $orderBy, $type, $pager)
  44. {
  45. parent::assignTestcaseVars($executionID, $productID, $branchID, $moduleID, $param, $orderBy, $type, $pager);
  46. $executionCases = $this->view->cases;
  47. $caseRelatedObjectList = $this->loadModel('custom')->getRelatedObjectList(array_keys($executionCases), 'testcase', 'byRelation', true);
  48. foreach($executionCases as $case)
  49. {
  50. $case->caseID = $case->id;
  51. $case->relatedObject = zget($caseRelatedObjectList, $case->id, 0);
  52. }
  53. $this->view->cases = $executionCases;
  54. }