create.html.php 1.5 KB

12345678910111213141516171819202122232425262728293031
  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. data('testcase', $case);
  13. include($this->app->getModuleRoot() . 'ai/ui/inputinject.html.php');
  14. $params = $app->getParams();
  15. array_shift($params);
  16. jsVar('createParams', http_build_query($params));
  17. jsVar('tab', $this->app->tab);
  18. if($app->tab == 'execution') jsVar('objectID', $executionID);
  19. if($app->tab == 'project') jsVar('objectID', $projectID);
  20. if($app->tab == 'qa') jsVar('objectID', 0);
  21. unset($lang->testcase->typeList['unit']);
  22. $fields = useFields('testcase.create');
  23. $fields->autoLoad('product', 'product,branch,module,story,scene')
  24. ->autoLoad('branch', 'module,story,scene')
  25. ->autoLoad('module', 'story,scene');
  26. formGridPanel(set::modeSwitcher(false), set::title($lang->testcase->create), set::fields($fields), set::data($case), set::loadUrl(helper::createLink('testcase', 'create', "productID={product}&branch={branch}&moduleID={module}&from=$from&param=$param")), !empty($gobackLink) ? set::backUrl($gobackLink) : null, on::change('#story', 'changeStory'), on::change('[name=product]', 'loadProduct'), on::click('#auto', 'checkScript'));