create.html.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * The create file of bug 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 Yuting Wang<wangyuting@easycorp.ltd>
  8. * @package bug
  9. * @link https://www.zentao.net
  10. */
  11. namespace zin;
  12. include($this->app->getModuleRoot() . 'ai/ui/inputinject.html.php');
  13. $fields = useFields('bug.create');
  14. if(!empty($executionType) && $executionType == 'kanban') $fields->merge('bug.kanban');
  15. $fields->autoLoad('product', array('items' => 'product,module,assignedTo,story,execution,task,openedBuild,project,injection,identify,plan,case,' . (!empty($lang->bug->flowExtraFields) ? implode(',', $lang->bug->flowExtraFields) : ''), 'updateOrders' => true))
  16. ->autoLoad('branch', 'module,execution,project,story,task,assignedTo,plan')
  17. ->autoLoad('module', 'assignedTo,story')
  18. ->autoLoad('project', 'project,execution,story,task,assignedTo,injection,identify,openedBuild')
  19. ->autoLoad('execution', 'execution,story,task,assignedTo,openedBuild')
  20. ->autoLoad('allBuilds', 'openedBuild')
  21. ->autoLoad('allUsers', 'assignedTo')
  22. ->autoLoad('region', 'lane');
  23. if(!$product->shadow) $fields->fullModeOrders('module,project,execution,plan', 'pri,title');
  24. $fields->sort('execution,plan');
  25. jsVar('bug', $bug);
  26. jsVar('moduleID', $bug->moduleID);
  27. jsVar('methodName', $app->methodName);
  28. jsVar('projectID', isset($projectID) ? $projectID : 0);
  29. jsVar('executionID', isset($executionID) ? $executionID : 0);
  30. jsVar('copyBugID', $copyBugID);
  31. jsVar('tab', $this->app->tab);
  32. jsVar('createRelease', $lang->release->create);
  33. jsVar('refresh', $lang->refreshIcon);
  34. jsVar('projectExecutionPairs', $projectExecutionPairs);
  35. formGridPanel
  36. (
  37. set::title($lang->bug->create),
  38. set::fields($fields),
  39. set::loadUrl($loadUrl)
  40. );