tao.php 1002 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * The tao file of mr module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  6. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Yanyi Cao <caoyanyi@easycorp.ltd>
  8. * @package mr
  9. * @link https://www.zentao.net
  10. */
  11. class mrTao extends mrModel
  12. {
  13. /**
  14. * 根据合并请求获取关联对象信息。
  15. * Get story,task,bug pairs which linked MR.
  16. *
  17. * @param int $MRID
  18. * @param string $objectType story|task|bug
  19. * @access public
  20. * @return array
  21. */
  22. protected function getLinkedObjectPairs($MRID, $objectType = 'story')
  23. {
  24. return $this->dao->select('BID')->from(TABLE_RELATION)
  25. ->where('AType')->eq($this->app->rawModule)
  26. ->andWhere('BType')->eq($objectType)
  27. ->andWhere('AID')->eq($MRID)
  28. ->fetchPairs();
  29. }
  30. }