control.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450
  1. <?php
  2. class epic extends control
  3. {
  4. /**
  5. * Create a epic.
  6. *
  7. * @param int $productID
  8. * @param string $branch
  9. * @param int $moduleID
  10. * @param int $storyID
  11. * @param int $objectID projectID|executionID
  12. * @param int $bugID
  13. * @param int $planID
  14. * @param int $todoID
  15. * @param string $extra for example feedbackID=0
  16. * @access public
  17. * @return void
  18. */
  19. public function create($productID = 0, $branch = '', $moduleID = 0, $storyID = 0, $objectID = 0, $bugID = 0, $planID = 0, $todoID = 0, $extra = '')
  20. {
  21. echo $this->fetch('story', 'create', "productID=$productID&branch=$branch&moduleID=$moduleID&storyID=$storyID&objectID=$objectID&bugID=$bugID&planID=$planID&todoID=$todoID&extra=$extra&storyType=epic");
  22. }
  23. /**
  24. * Create a batch stories.
  25. *
  26. * @param int $productID
  27. * @param string $branch
  28. * @param int $moduleID
  29. * @param int $storyID
  30. * @param int $executionID projectID|executionID
  31. * @param int $plan
  32. * @param string $storyType
  33. * @param string $extra for example feedbackID=0
  34. * @access public
  35. * @return void
  36. */
  37. public function batchCreate($productID = 0, $branch = '', $moduleID = 0, $storyID = 0, $executionID = 0, $plan = 0, $storyType = 'epic', $extra = '')
  38. {
  39. echo $this->fetch('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID&storyID=$storyID&executionID=$executionID&plan=$plan&storyType=epic&extra=$extra");
  40. }
  41. /**
  42. * View a epic.
  43. *
  44. * @param int $storyID
  45. * @param int $version
  46. * @param int $param executionID|projectID
  47. * @param string $storyType
  48. * @access public
  49. * @return void
  50. */
  51. public function view($storyID, $version = 0, $param = 0)
  52. {
  53. echo $this->fetch('story', 'view', "storyID=$storyID&version=$version&param=$param&storyType=epic");
  54. }
  55. /**
  56. * Edit a epic.
  57. *
  58. * @param int $storyID
  59. * @param string $kanbanGroup
  60. * @access public
  61. * @return void
  62. */
  63. public function edit($storyID, $kanbanGroup = 'default')
  64. {
  65. echo $this->fetch('story', 'edit', "storyID=$storyID&kanbanGroup=$kanbanGroup&storyType=epic");
  66. }
  67. /**
  68. * Batch edit epic.
  69. *
  70. * @param int $productID
  71. * @param int $executionID
  72. * @param string $branch
  73. * @param string $storyType
  74. * @param string $from
  75. * @access public
  76. * @return void
  77. */
  78. public function batchEdit($productID = 0, $executionID = 0, $branch = '', $storyType = 'epic', $from = '')
  79. {
  80. echo $this->fetch('story', 'batchEdit', "productID=$productID&executionID=$executionID&branch=$branch&storyType=epic&from=$from");
  81. }
  82. /**
  83. * 关联Epic。
  84. * Link related epics.
  85. *
  86. * @param int $storyID
  87. * @param string $browseType
  88. * @param string $excludeStories
  89. * @param int $param
  90. * @param int $recTotal
  91. * @param int $recPerPage
  92. * @param int $pageID
  93. * @access public
  94. * @return void
  95. */
  96. public function linkStories($storyID, $browseType = '', $excludeStories = '', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
  97. {
  98. echo $this->fetch('story', 'linkStories', "storyID=$storyID&browseType=$browseType&excludeStories=$excludeStories&param=$param&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
  99. }
  100. /**
  101. * 关联用户需求。
  102. * Link related requirements.
  103. *
  104. * @param int $storyID
  105. * @param string $browseType
  106. * @param string $excludeStories
  107. * @param int $param
  108. * @param int $recTotal
  109. * @param int $recPerPage
  110. * @param int $pageID
  111. * @access public
  112. * @return void
  113. */
  114. public function linkRequirements($storyID, $browseType = '', $excludeStories = '', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
  115. {
  116. echo $this->fetch('story', 'linkRequirements', "storyID=$storyID&browseType=$browseType&excludeStories=$excludeStories&param=$param&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
  117. }
  118. /**
  119. * 导出需求数据。
  120. * Get the data of the requiremens to export.
  121. *
  122. * @param int $productID
  123. * @param string $orderBy
  124. * @param int $executionID
  125. * @param string $browseType
  126. * @access public
  127. * @return void
  128. */
  129. public function export($productID, $orderBy, $executionID = 0, $browseType = '')
  130. {
  131. echo $this->fetch('story', 'export', "productID=$productID&orderBy=$orderBy&executionID=$executionID&browseType=$browseType&storyType=epic");
  132. }
  133. /**
  134. * 导入需求数据。
  135. * Import the data of the requiremens.
  136. *
  137. * @param int $productID
  138. * @param int $branch
  139. * @param string $storyType
  140. * @param int $projectID
  141. * @access public
  142. * @return void
  143. */
  144. public function import($productID, $branch = 0, $storyType = 'epic', $projectID = 0)
  145. {
  146. echo $this->fetch('story', 'import', "productID=$productID&branch=$branch&storyType=epic&projectID=$projectID");
  147. }
  148. /**
  149. * 显示导入需求数据的页面。
  150. * Show the page of importing the data of the requiremens.
  151. *
  152. * @param int $productID
  153. * @param int $branch
  154. * @param string $type
  155. * @param int $projectID
  156. * @param int $pagerID
  157. * @param int $maxImport
  158. * @param string $insert
  159. * @access public
  160. * @return void
  161. */
  162. public function showImport($productID, $branch = 0, $type = 'epic', $projectID = 0, $pagerID = 1, $maxImport = 0, $insert = '')
  163. {
  164. echo $this->fetch('story', 'showImport', "productID=$productID&branch=$branch&type=epic&projectID=$projectID&pagerID=$pagerID&maxImport=$maxImport&insert=$insert");
  165. }
  166. /**
  167. * 导出需求模板。
  168. * Export the template of the requiremens.
  169. *
  170. * @param int $productID
  171. * @param int $branch
  172. * @param string $storyType
  173. * @access public
  174. * @return void
  175. */
  176. public function exportTemplate($productID, $branch = 0, $storyType = 'epic')
  177. {
  178. echo $this->fetch('story', 'exportTemplate', "productID=$productID&branch=$branch&storyType=epic");
  179. }
  180. /**
  181. * Delete a epic.
  182. *
  183. * @param int $storyID
  184. * @param string $confirm yes|no
  185. * @param string $from taskkanban
  186. * @access public
  187. * @return void
  188. */
  189. public function delete($storyID, $confirm = 'no', $from = '')
  190. {
  191. echo $this->fetch('story', 'delete', "storyID=$storyID&confirm=$confirm&from=$from&storyType=epic");
  192. }
  193. /**
  194. * Change a epic.
  195. *
  196. * @param int $storyID
  197. * @param string $from
  198. * @access public
  199. * @return void
  200. */
  201. public function change($storyID, $from = '')
  202. {
  203. echo $this->fetch('story', 'change', "storyID=$storyID&from=$from&storyType=epic");
  204. }
  205. /**
  206. * Review a epic.
  207. *
  208. * @param int $storyID
  209. * @param string $from product|project
  210. * @access public
  211. * @return void
  212. */
  213. public function review($storyID, $from = 'product')
  214. {
  215. echo $this->fetch('story', 'review', "storyID=$storyID&from=$from&storyType=epic");
  216. }
  217. /**
  218. * Submit review.
  219. *
  220. * @param int $storyID
  221. * @access public
  222. * @return void
  223. */
  224. public function submitReview($storyID)
  225. {
  226. echo $this->fetch('story', 'submitReview', "storyID=$storyID&storyType=epic");
  227. }
  228. /**
  229. * Batch review epics.
  230. *
  231. * @param string $result
  232. * @param string $reason
  233. * @access public
  234. * @return void
  235. */
  236. public function batchReview($result, $reason = '')
  237. {
  238. echo $this->fetch('story', 'batchReview', "result=$result&reason=$reason&storyType=epic");
  239. }
  240. /**
  241. * Recall the epic review or epic change.
  242. *
  243. * @param int $storyID
  244. * @param string $from list
  245. * @param string $confirm no|yes
  246. * @access public
  247. * @return void
  248. */
  249. public function recall($storyID, $from = 'list', $confirm = 'no')
  250. {
  251. echo $this->fetch('story', 'recall', "storyID=$storyID&from=$from&confirm=$confirm&storyType=epic");
  252. }
  253. /**
  254. * 需求的指派给页面。
  255. * Assign the epic to a user.
  256. *
  257. * @param int $storyID
  258. * @access public
  259. * @return void
  260. */
  261. public function assignTo($storyID)
  262. {
  263. echo $this->fetch('story', 'assignTo', "storyID=$storyID");
  264. }
  265. /**
  266. * 关闭需求。
  267. * Close the epic.
  268. *
  269. * @param int $storyID
  270. * @param string $from taskkanban
  271. * @access public
  272. * @return void
  273. */
  274. public function close($storyID, $from = '')
  275. {
  276. echo $this->fetch('story', 'close', "storyID=$storyID&from=$from&storyType=epic");
  277. }
  278. /**
  279. * 批量关闭需求。
  280. * Batch close the requiremens.
  281. *
  282. * @param int $productID
  283. * @param int $executionID
  284. * @param string $storyType
  285. * @param string $from contribute|work
  286. * @access public
  287. * @return void
  288. */
  289. public function batchClose($productID = 0, $executionID = 0, $storyType = 'epic', $from = '')
  290. {
  291. echo $this->fetch('story', 'batchClose', "productID=$productID&executionID=$executionID&storyType=epic&from=$from");
  292. }
  293. /**
  294. * 激活需求。
  295. * Activate a epic.
  296. *
  297. * @param int $storyID
  298. * @access public
  299. * @return void
  300. */
  301. public function activate($storyID)
  302. {
  303. echo $this->fetch('story', 'activate', "storyID=$storyID&storyType=epic");
  304. }
  305. /**
  306. * 查看需求的报告。
  307. * The report page.
  308. *
  309. * @param int $productID
  310. * @param int $branchID
  311. * @param string $storyType
  312. * @param string $browseType
  313. * @param int $moduleID
  314. * @param string $chartType
  315. * @param int $projectID
  316. * @access public
  317. * @return void
  318. */
  319. public function report($productID, $branchID, $storyType = 'epic', $browseType = 'unclosed', $moduleID = 0, $chartType = 'pie', $projectID = 0)
  320. {
  321. echo $this->fetch('story', 'report', "productID=$productID&branchID=$branchID&storyType=epic&browseType=$browseType&moduleID=$moduleID&chartType=$chartType&projectID=$projectID");
  322. }
  323. /**
  324. * Batch change branch.
  325. *
  326. * @param int $branchID
  327. * @param string $confirm yes|no
  328. * @param string $storyIdList
  329. * @access public
  330. * @return void
  331. */
  332. public function batchChangeBranch($branchID, $confirm = '', $storyIdList = '')
  333. {
  334. echo $this->fetch('story', 'batchChangeBranch', "branchID=$branchID&confirm=$confirm&storyIdList=$storyIdList&storyType=epic");
  335. }
  336. /**
  337. * Batch assign to.
  338. *
  339. * @param string $storyType story|epic
  340. * @access public
  341. * @return void
  342. * @param string $assignedTo
  343. */
  344. public function batchAssignTo($storyType = 'epic', $assignedTo = '')
  345. {
  346. echo $this->fetch('story', 'batchAssignTo', "storyType=epic&assignedTo=$assignedTo");
  347. }
  348. /**
  349. * Batch change the module of story.
  350. *
  351. * @param int $moduleID
  352. * @access public
  353. * @return void
  354. */
  355. public function batchChangeModule($moduleID)
  356. {
  357. echo $this->fetch('story', 'batchChangeModule', "moduleID=$moduleID&storyType=epic");
  358. }
  359. /**
  360. * Batch change parent.
  361. *
  362. * @param int $productID
  363. * @param string $storyType
  364. * @access public
  365. * @return void
  366. */
  367. public function batchChangeParent($productID = 0, $storyType = 'epic')
  368. {
  369. echo $this->fetch('story', 'batchChangeParent', "productID=$productID&storyType=epic");
  370. }
  371. /**
  372. * Batch change grade.
  373. *
  374. * @param int $grade
  375. * @param string $storyType
  376. * @access public
  377. * @return void
  378. */
  379. public function batchChangeGrade($grade, $storyType = 'epic')
  380. {
  381. echo $this->fetch('story', 'batchChangeGrade', "grade=$grade&storyType=epic");
  382. }
  383. /**
  384. * Batch change plan.
  385. *
  386. * @param int $planID
  387. * @param int $oldPlanID
  388. * @access public
  389. * @return void
  390. */
  391. public function batchChangePlan($planID, $oldPlanID = 0)
  392. {
  393. echo $this->fetch('story', 'batchChangePlan', "planID=$planID&oldPlanID=$oldPlanID&storyType=epic");
  394. }
  395. /**
  396. * Ajax get the stories of a user.
  397. *
  398. * @param int $userID
  399. * @param string $id
  400. * @param int $appendID
  401. * @param string $storyType
  402. * @access public
  403. * @return void
  404. */
  405. public function ajaxGetUserStories($userID = 0, $id = '', $appendID = 0, $storyType = 'epic')
  406. {
  407. echo $this->fetch('story', 'ajaxGetUserStories', "userID=$userID&id=$id&appendID=$appendID&storyType=epic");
  408. }
  409. /**
  410. * 需求的父需求变更时,子需求确认变更。
  411. * Confirm the change of the parent story.
  412. *
  413. * @param int $storyID
  414. * @access public
  415. * @return void
  416. */
  417. public function processStoryChange($storyID)
  418. {
  419. echo $this->fetch('story', 'processStoryChange', "storyID=$storyID");
  420. }
  421. }