config.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <?php
  2. $config->story = new stdclass();
  3. $config->story->defaultPriority = 3;
  4. $config->story->batchCreate = 10;
  5. $config->story->affectedFixedNum = 7;
  6. $config->story->needReview = 1;
  7. $config->story->removeFields = 'objectTypeList,productList,executionList,execution';
  8. $config->story->feedbackSource = array('customer', 'user', 'market', 'service', 'operation', 'support', 'forum');
  9. $config->story->batchClose = new stdclass();
  10. $config->story->batchClose->columns = 10;
  11. $config->story->create = new stdclass();
  12. $config->story->edit = new stdclass();
  13. $config->story->change = new stdclass();
  14. $config->story->close = new stdclass();
  15. $config->story->review = new stdclass();
  16. $config->story->create->requiredFields = 'title';
  17. $config->story->edit->requiredFields = 'title';
  18. $config->story->change->requiredFields = 'title';
  19. $config->story->close->requiredFields = 'closedReason';
  20. $config->story->review->requiredFields = '';
  21. $config->story->editor = new stdclass();
  22. $config->story->editor->create = array('id' => 'spec,verify', 'tools' => 'simpleTools');
  23. $config->story->editor->change = array('id' => 'spec,verify,comment', 'tools' => 'simpleTools');
  24. $config->story->editor->edit = array('id' => 'spec,verify,comment', 'tools' => 'simpleTools');
  25. $config->story->editor->view = array('id' => 'comment,lastComment', 'tools' => 'simpleTools');
  26. $config->story->editor->close = array('id' => 'comment', 'tools' => 'simpleTools');
  27. $config->story->editor->review = array('id' => 'comment', 'tools' => 'simpleTools');
  28. $config->story->editor->activate = array('id' => 'comment', 'tools' => 'simpleTools');
  29. $config->story->editor->assignto = array('id' => 'comment', 'tools' => 'simpleTools');
  30. $config->story->list = new stdclass();
  31. $config->story->exportFields = '
  32. id, product, branch, module, plan, source, sourceNote, title, spec, verify, grade, parent, keywords,
  33. pri, estimate, status, stage, category, taskCountAB, bugCountAB, caseCountAB,
  34. openedBy, openedDate, assignedTo, assignedDate, mailto,
  35. reviewedBy, reviewedDate,
  36. closedBy, closedDate, closedReason,
  37. lastEditedBy, lastEditedDate, feedbackBy,
  38. duplicateStory, files';
  39. $config->story->list->customCreateFields = '';
  40. $config->story->list->customBatchCreateFields = 'plan,assignedTo,spec,source,verify,pri,estimate,keywords,mailto';
  41. $config->story->list->customBatchEditFields = 'branch,plan,estimate,pri,assignedTo,source,stage,closedBy,closedReason,keywords';
  42. $config->story->list->actionsOperatedParentStory = ',edit,batchcreate,change,review,recall,submitreview,processstorychange,';
  43. $config->story->custom = new stdclass();
  44. $config->story->custom->createFields = $config->story->list->customCreateFields;
  45. $config->story->custom->batchCreateFields = 'module,plan,spec,pri,estimate,review,%s';
  46. $config->story->custom->batchEditFields = 'branch,module,plan,estimate,pri,source,stage,closedBy,closedReason';
  47. $config->story->excludeCheckFields = ',uploadImage,category,reviewer,reviewDitto,lanes,regions,branch,pri,';
  48. global $app, $lang;
  49. $config->story->actionList = array();
  50. $config->story->actionList['change']['icon'] = 'change';
  51. $config->story->actionList['change']['text'] = $lang->story->change;
  52. $config->story->actionList['change']['hint'] = $lang->story->change;
  53. $config->story->actionList['change']['url'] = array('module' => 'story', 'method' => 'change', 'params' => 'storyID={id}');
  54. $config->story->actionList['change']['data-app'] = $app->tab;
  55. $config->story->actionList['submitReview']['icon'] = 'confirm';
  56. $config->story->actionList['submitReview']['text'] = $lang->story->submitReview;
  57. $config->story->actionList['submitReview']['hint'] = $lang->story->submitReview;
  58. $config->story->actionList['submitReview']['url'] = array('module' => 'story', 'method' => 'submitReview', 'params' => 'storyID={id}&storyType={type}');
  59. $config->story->actionList['submitReview']['data-toggle'] = 'modal';
  60. $config->story->actionList['recall']['icon'] = 'undo';
  61. $config->story->actionList['recall']['text'] = $lang->story->recall;
  62. $config->story->actionList['recall']['hint'] = $lang->story->recall;
  63. $config->story->actionList['recall']['url'] = array('module' => 'story', 'method' => 'recall', 'params' => 'storyID={id}&from=view&confirm=no&storyType={type}');
  64. $config->story->actionList['recall']['data-app'] = $app->tab;
  65. $config->story->actionList['recall']['className'] = 'ajax-submit';
  66. $config->story->actionList['review']['icon'] = 'search';
  67. $config->story->actionList['review']['text'] = $lang->story->review;
  68. $config->story->actionList['review']['hint'] = $lang->story->review;
  69. $config->story->actionList['review']['url'] = array('module' => 'story', 'method' => 'review', 'params' => 'storyID={id}&from=' . $app->tab . '&storyType={type}');
  70. $config->story->actionList['review']['data-app'] = $app->tab;
  71. $config->story->actionList['subdivide']['icon'] = 'split';
  72. $config->story->actionList['subdivide']['text'] = $lang->story->subdivide;
  73. $config->story->actionList['subdivide']['hint'] = $lang->story->subdivide;
  74. $config->story->actionList['subdivide']['url'] = array('module' => 'story', 'method' => 'batchCreate', 'params' => 'productID={product}&branch={branch}&moduleID={module}&storyID={id}&executionID={execution}&plan=0&storyType=story');
  75. $config->story->actionList['subdivide']['data-app'] = $app->tab;
  76. $config->story->actionList['assignTo']['icon'] = 'hand-right';
  77. $config->story->actionList['assignTo']['text'] = $lang->story->assignTo;
  78. $config->story->actionList['assignTo']['hint'] = $lang->story->assignTo;
  79. $config->story->actionList['assignTo']['url'] = array('module' => 'story', 'method' => 'assignTo', 'params' => 'storyID={id}&kanbanGroup=default&from=&storyType={type}');
  80. $config->story->actionList['assignTo']['data-toggle'] = 'modal';
  81. $config->story->actionList['close']['icon'] = 'off';
  82. $config->story->actionList['close']['text'] = $lang->story->close;
  83. $config->story->actionList['close']['hint'] = $lang->story->close;
  84. $config->story->actionList['close']['url'] = array('module' => 'story', 'method' => 'close', 'params' => 'storyID={id}&from=&storyType={type}');
  85. $config->story->actionList['close']['data-toggle'] = 'modal';
  86. $config->story->actionList['activate']['icon'] = 'magic';
  87. $config->story->actionList['activate']['text'] = $lang->story->activate;
  88. $config->story->actionList['activate']['hint'] = $lang->story->activate;
  89. $config->story->actionList['activate']['url'] = array('module' => 'story', 'method' => 'activate', 'params' => 'storyID={id}&storyType={type}');
  90. $config->story->actionList['activate']['data-toggle'] = 'modal';
  91. $config->story->actionList['importToLib']['icon'] = 'assets';
  92. if(isset($lang->story->importToLib)) $config->story->actionList['importToLib']['text'] = $lang->story->importToLib;
  93. if(isset($lang->story->importToLib)) $config->story->actionList['importToLib']['hint'] = $lang->story->importToLib;
  94. $config->story->actionList['importToLib']['url'] = '#importToLib';
  95. $config->story->actionList['importToLib']['data-toggle'] = 'modal';
  96. $app->loadLang('testcase');
  97. $config->story->actionList['createTestcase']['text'] = $lang->testcase->create;
  98. $config->story->actionList['createTestcase']['hint'] = $lang->testcase->create;
  99. $config->story->actionList['createTestcase']['url'] = array('module' => 'testcase', 'method' => 'create', 'params' => 'product={product}&branch={branch}&moduleID=0&from=&param=0&storyid={id}');
  100. $config->story->actionList['createTestcase']['data-size'] = 'lg';
  101. $config->story->actionList['createTestcase']['data-toggle'] = 'modal';
  102. $config->story->actionList['createTestcase']['data-close-others'] = true;
  103. $config->story->actionList['batchCreateTestcase']['text'] = $lang->testcase->batchCreate;
  104. $config->story->actionList['batchCreateTestcase']['hint'] = $lang->testcase->batchCreate;
  105. $config->story->actionList['batchCreateTestcase']['url'] = array('module' => 'testcase', 'method' => 'batchCreate', 'params' => 'product={product}&branch={branch}&moduleID=0&storyid={id}');
  106. $config->story->actionList['batchCreateTestcase']['data-size'] = 'lg';
  107. $config->story->actionList['batchCreateTestcase']['data-toggle'] = 'modal';
  108. $config->story->actionList['batchCreateTestcase']['data-close-others'] = true;
  109. $config->story->actionList['testcase']['type'] = 'dropdown';
  110. $config->story->actionList['testcase']['text'] = $lang->testcase->common;
  111. $config->story->actionList['testcase']['hint'] = $lang->testcase->common;
  112. $config->story->actionList['testcase']['key'] = 'testcase';
  113. $config->story->actionList['testcase']['caret'] = 'up';
  114. $config->story->actionList['testcase']['placement'] = 'top-end';
  115. $config->story->actionList['testcase']['data-load'] = false;
  116. $config->story->actionList['testcase']['items'] = array('createTestcase', 'batchCreateTestcase');
  117. $app->loadLang('task');
  118. $config->story->actionList['createTask']['icon'] = 'plus';
  119. $config->story->actionList['createTask']['text'] = $lang->task->create;
  120. $config->story->actionList['createTask']['hint'] = $lang->task->create;
  121. $config->story->actionList['createTask']['key'] = 'createTask';
  122. $config->story->actionList['createTask']['url'] = array('module' => 'task', 'method' => 'create', 'params' => 'executionID={execution}&storyID={id}&moduleID={module}');
  123. $config->story->actionList['createTask']['data-size'] = 'lg';
  124. $config->story->actionList['createTask']['data-toggle'] = 'modal';
  125. $config->story->actionList['edit']['icon'] = 'edit';
  126. $config->story->actionList['edit']['text'] = $lang->story->edit;
  127. $config->story->actionList['edit']['hint'] = $lang->story->edit;
  128. $config->story->actionList['edit']['url'] = array('module' => 'story', 'method' => 'edit', 'params' => 'storyID={id}&kanbanGroup=default&storyType={type}');
  129. $config->story->actionList['edit']['data-app'] = $app->tab;
  130. $config->story->actionList['copy']['icon'] = 'copy';
  131. $config->story->actionList['copy']['text'] = $lang->story->copy;
  132. $config->story->actionList['copy']['hint'] = $lang->story->copy;
  133. $config->story->actionList['copy']['url'] = array('module' => 'story', 'method' => 'create', 'params' => 'product={product}&branch={branch}&moduleID={module}&storyID={id}&executionID=0&bugID=0&planID=0&todoID=0&extra=&storyType={type}');
  134. $config->story->actionList['copy']['data-app'] = $app->tab;
  135. $config->story->actionList['copy']['notInModal'] = true;
  136. $config->story->actionList['delete']['icon'] = 'trash';
  137. $config->story->actionList['delete']['text'] = $lang->task->delete;
  138. $config->story->actionList['delete']['hint'] = $lang->task->delete;
  139. $config->story->actionList['delete']['url'] = array('module' => 'story', 'method' => 'delete', 'params' => 'storyID={id}&confirm=yes');
  140. $config->story->actionList['delete']['data-confirm'] = array('message' => $lang->story->confirmDelete, 'icon' => 'icon-exclamation-sign', 'iconClass' => 'warning-pale rounded-full icon-2x');
  141. $config->story->actionList['delete']['className'] = 'ajax-submit';
  142. $config->story->actionList['createBranch']['icon'] = 'treemap';
  143. $config->story->actionList['createBranch']['hint'] = $lang->story->codeBranch;
  144. $config->story->actionList['createBranch']['text'] = $lang->story->codeBranch;
  145. $config->story->actionList['createBranch']['url'] = helper::createLink('story', 'createBranch', 'storyID={id}');
  146. $config->story->actionList['createBranch']['data-toggle'] = 'modal';
  147. $config->story->actions = new stdclass();
  148. $config->story->actions->view = array();
  149. $config->story->actions->view['mainActions'] = array('change', 'submitReview', 'recall', 'review', 'subdivide', 'createBranch', 'assignTo', 'close', 'activate', 'importToLib', 'testcase', 'createTask');
  150. $config->story->actions->view['suffixActions'] = array('edit', 'copy', 'delete');
  151. if(!helper::hasFeature('devops')) $config->story->actions->view['mainActions'] = array_diff($config->story->actions->view['mainActions'], array('createBranch'));