@endora-commerce/mod-tasks 0.0.0-stage → 0.110.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (543) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +61 -2
  3. package/dist/admin/api.d.ts +121 -0
  4. package/dist/admin/api.d.ts.map +1 -0
  5. package/dist/admin/api.js +262 -0
  6. package/dist/admin/api.js.map +1 -0
  7. package/dist/admin/components/AssigneePicker.d.ts +36 -0
  8. package/dist/admin/components/AssigneePicker.d.ts.map +1 -0
  9. package/dist/admin/components/AssigneePicker.js +64 -0
  10. package/dist/admin/components/AssigneePicker.js.map +1 -0
  11. package/dist/admin/components/BoardCardFieldsEditor.d.ts +23 -0
  12. package/dist/admin/components/BoardCardFieldsEditor.d.ts.map +1 -0
  13. package/dist/admin/components/BoardCardFieldsEditor.js +138 -0
  14. package/dist/admin/components/BoardCardFieldsEditor.js.map +1 -0
  15. package/dist/admin/components/ContextLabel.d.ts +13 -0
  16. package/dist/admin/components/ContextLabel.d.ts.map +1 -0
  17. package/dist/admin/components/ContextLabel.js +18 -0
  18. package/dist/admin/components/ContextLabel.js.map +1 -0
  19. package/dist/admin/components/ContextSection.d.ts +27 -0
  20. package/dist/admin/components/ContextSection.d.ts.map +1 -0
  21. package/dist/admin/components/ContextSection.js +60 -0
  22. package/dist/admin/components/ContextSection.js.map +1 -0
  23. package/dist/admin/components/DigestControl.d.ts +15 -0
  24. package/dist/admin/components/DigestControl.d.ts.map +1 -0
  25. package/dist/admin/components/DigestControl.js +102 -0
  26. package/dist/admin/components/DigestControl.js.map +1 -0
  27. package/dist/admin/components/LinkedRecordsSection.d.ts +25 -0
  28. package/dist/admin/components/LinkedRecordsSection.d.ts.map +1 -0
  29. package/dist/admin/components/LinkedRecordsSection.js +93 -0
  30. package/dist/admin/components/LinkedRecordsSection.js.map +1 -0
  31. package/dist/admin/components/LookupPicker.d.ts +26 -0
  32. package/dist/admin/components/LookupPicker.d.ts.map +1 -0
  33. package/dist/admin/components/LookupPicker.js +42 -0
  34. package/dist/admin/components/LookupPicker.js.map +1 -0
  35. package/dist/admin/components/RelatedTasksSection.d.ts +19 -0
  36. package/dist/admin/components/RelatedTasksSection.d.ts.map +1 -0
  37. package/dist/admin/components/RelatedTasksSection.js +64 -0
  38. package/dist/admin/components/RelatedTasksSection.js.map +1 -0
  39. package/dist/admin/components/RemindersSection.d.ts +22 -0
  40. package/dist/admin/components/RemindersSection.d.ts.map +1 -0
  41. package/dist/admin/components/RemindersSection.js +107 -0
  42. package/dist/admin/components/RemindersSection.js.map +1 -0
  43. package/dist/admin/components/StatusBadge.d.ts +13 -0
  44. package/dist/admin/components/StatusBadge.d.ts.map +1 -0
  45. package/dist/admin/components/StatusBadge.js +12 -0
  46. package/dist/admin/components/StatusBadge.js.map +1 -0
  47. package/dist/admin/components/SubtasksSection.d.ts +25 -0
  48. package/dist/admin/components/SubtasksSection.d.ts.map +1 -0
  49. package/dist/admin/components/SubtasksSection.js +76 -0
  50. package/dist/admin/components/SubtasksSection.js.map +1 -0
  51. package/dist/admin/components/TaskAttachments.d.ts +24 -0
  52. package/dist/admin/components/TaskAttachments.d.ts.map +1 -0
  53. package/dist/admin/components/TaskAttachments.js +135 -0
  54. package/dist/admin/components/TaskAttachments.js.map +1 -0
  55. package/dist/admin/components/TaskBoard.d.ts +44 -0
  56. package/dist/admin/components/TaskBoard.d.ts.map +1 -0
  57. package/dist/admin/components/TaskBoard.js +295 -0
  58. package/dist/admin/components/TaskBoard.js.map +1 -0
  59. package/dist/admin/components/TaskCard.d.ts +14 -0
  60. package/dist/admin/components/TaskCard.d.ts.map +1 -0
  61. package/dist/admin/components/TaskCard.js +125 -0
  62. package/dist/admin/components/TaskCard.js.map +1 -0
  63. package/dist/admin/components/TaskComments.d.ts +18 -0
  64. package/dist/admin/components/TaskComments.d.ts.map +1 -0
  65. package/dist/admin/components/TaskComments.js +58 -0
  66. package/dist/admin/components/TaskComments.js.map +1 -0
  67. package/dist/admin/components/TaskCustomFields.d.ts +15 -0
  68. package/dist/admin/components/TaskCustomFields.d.ts.map +1 -0
  69. package/dist/admin/components/TaskCustomFields.js +66 -0
  70. package/dist/admin/components/TaskCustomFields.js.map +1 -0
  71. package/dist/admin/components/TaskFieldInputs.d.ts +47 -0
  72. package/dist/admin/components/TaskFieldInputs.d.ts.map +1 -0
  73. package/dist/admin/components/TaskFieldInputs.js +79 -0
  74. package/dist/admin/components/TaskFieldInputs.js.map +1 -0
  75. package/dist/admin/components/TaskFilters.d.ts +34 -0
  76. package/dist/admin/components/TaskFilters.d.ts.map +1 -0
  77. package/dist/admin/components/TaskFilters.js +100 -0
  78. package/dist/admin/components/TaskFilters.js.map +1 -0
  79. package/dist/admin/components/TaskMarkers.d.ts +13 -0
  80. package/dist/admin/components/TaskMarkers.d.ts.map +1 -0
  81. package/dist/admin/components/TaskMarkers.js +20 -0
  82. package/dist/admin/components/TaskMarkers.js.map +1 -0
  83. package/dist/admin/components/TaskPicker.d.ts +21 -0
  84. package/dist/admin/components/TaskPicker.d.ts.map +1 -0
  85. package/dist/admin/components/TaskPicker.js +56 -0
  86. package/dist/admin/components/TaskPicker.js.map +1 -0
  87. package/dist/admin/components/ViewModeToggle.d.ts +12 -0
  88. package/dist/admin/components/ViewModeToggle.d.ts.map +1 -0
  89. package/dist/admin/components/ViewModeToggle.js +18 -0
  90. package/dist/admin/components/ViewModeToggle.js.map +1 -0
  91. package/dist/admin/components/priorities/TaskPriorityDeleteDialog.d.ts +20 -0
  92. package/dist/admin/components/priorities/TaskPriorityDeleteDialog.d.ts.map +1 -0
  93. package/dist/admin/components/priorities/TaskPriorityDeleteDialog.js +59 -0
  94. package/dist/admin/components/priorities/TaskPriorityDeleteDialog.js.map +1 -0
  95. package/dist/admin/components/priorities/TaskPriorityDialog.d.ts +29 -0
  96. package/dist/admin/components/priorities/TaskPriorityDialog.d.ts.map +1 -0
  97. package/dist/admin/components/priorities/TaskPriorityDialog.js +88 -0
  98. package/dist/admin/components/priorities/TaskPriorityDialog.js.map +1 -0
  99. package/dist/admin/components/tags/TaskTagDeleteDialog.d.ts +16 -0
  100. package/dist/admin/components/tags/TaskTagDeleteDialog.d.ts.map +1 -0
  101. package/dist/admin/components/tags/TaskTagDeleteDialog.js +34 -0
  102. package/dist/admin/components/tags/TaskTagDeleteDialog.js.map +1 -0
  103. package/dist/admin/components/tags/TaskTagDialog.d.ts +27 -0
  104. package/dist/admin/components/tags/TaskTagDialog.d.ts.map +1 -0
  105. package/dist/admin/components/tags/TaskTagDialog.js +60 -0
  106. package/dist/admin/components/tags/TaskTagDialog.js.map +1 -0
  107. package/dist/admin/components/task-columns.d.ts +5 -0
  108. package/dist/admin/components/task-columns.d.ts.map +1 -0
  109. package/dist/admin/components/task-columns.js +72 -0
  110. package/dist/admin/components/task-columns.js.map +1 -0
  111. package/dist/admin/components/workflow/TaskStatusDeleteDialog.d.ts +21 -0
  112. package/dist/admin/components/workflow/TaskStatusDeleteDialog.d.ts.map +1 -0
  113. package/dist/admin/components/workflow/TaskStatusDeleteDialog.js +63 -0
  114. package/dist/admin/components/workflow/TaskStatusDeleteDialog.js.map +1 -0
  115. package/dist/admin/components/workflow/TaskStatusDialog.d.ts +32 -0
  116. package/dist/admin/components/workflow/TaskStatusDialog.d.ts.map +1 -0
  117. package/dist/admin/components/workflow/TaskStatusDialog.js +102 -0
  118. package/dist/admin/components/workflow/TaskStatusDialog.js.map +1 -0
  119. package/dist/admin/components/workflow/TaskStatusesTable.d.ts +20 -0
  120. package/dist/admin/components/workflow/TaskStatusesTable.d.ts.map +1 -0
  121. package/dist/admin/components/workflow/TaskStatusesTable.js +25 -0
  122. package/dist/admin/components/workflow/TaskStatusesTable.js.map +1 -0
  123. package/dist/admin/index.d.ts +20 -0
  124. package/dist/admin/index.d.ts.map +1 -0
  125. package/dist/admin/index.js +121 -0
  126. package/dist/admin/index.js.map +1 -0
  127. package/dist/admin/lib/current-admin.d.ts +6 -0
  128. package/dist/admin/lib/current-admin.d.ts.map +1 -0
  129. package/dist/admin/lib/current-admin.js +11 -0
  130. package/dist/admin/lib/current-admin.js.map +1 -0
  131. package/dist/admin/lib/labels.d.ts +30 -0
  132. package/dist/admin/lib/labels.d.ts.map +1 -0
  133. package/dist/admin/lib/labels.js +76 -0
  134. package/dist/admin/lib/labels.js.map +1 -0
  135. package/dist/admin/lib/references.d.ts +16 -0
  136. package/dist/admin/lib/references.d.ts.map +1 -0
  137. package/dist/admin/lib/references.js +53 -0
  138. package/dist/admin/lib/references.js.map +1 -0
  139. package/dist/admin/lib/settings-paths.d.ts +10 -0
  140. package/dist/admin/lib/settings-paths.d.ts.map +1 -0
  141. package/dist/admin/lib/settings-paths.js +10 -0
  142. package/dist/admin/lib/settings-paths.js.map +1 -0
  143. package/dist/admin/lib/task-filters.d.ts +69 -0
  144. package/dist/admin/lib/task-filters.d.ts.map +1 -0
  145. package/dist/admin/lib/task-filters.js +180 -0
  146. package/dist/admin/lib/task-filters.js.map +1 -0
  147. package/dist/admin/lib/use-editor-focus.d.ts +25 -0
  148. package/dist/admin/lib/use-editor-focus.d.ts.map +1 -0
  149. package/dist/admin/lib/use-editor-focus.js +54 -0
  150. package/dist/admin/lib/use-editor-focus.js.map +1 -0
  151. package/dist/admin/lib/use-task-vocabulary.d.ts +15 -0
  152. package/dist/admin/lib/use-task-vocabulary.d.ts.map +1 -0
  153. package/dist/admin/lib/use-task-vocabulary.js +26 -0
  154. package/dist/admin/lib/use-task-vocabulary.js.map +1 -0
  155. package/dist/admin/pages/MyTasksPage.d.ts +17 -0
  156. package/dist/admin/pages/MyTasksPage.d.ts.map +1 -0
  157. package/dist/admin/pages/MyTasksPage.js +96 -0
  158. package/dist/admin/pages/MyTasksPage.js.map +1 -0
  159. package/dist/admin/pages/TaskCreate.d.ts +34 -0
  160. package/dist/admin/pages/TaskCreate.d.ts.map +1 -0
  161. package/dist/admin/pages/TaskCreate.js +146 -0
  162. package/dist/admin/pages/TaskCreate.js.map +1 -0
  163. package/dist/admin/pages/TaskDetail.d.ts +33 -0
  164. package/dist/admin/pages/TaskDetail.d.ts.map +1 -0
  165. package/dist/admin/pages/TaskDetail.js +431 -0
  166. package/dist/admin/pages/TaskDetail.js.map +1 -0
  167. package/dist/admin/pages/TasksPage.d.ts +21 -0
  168. package/dist/admin/pages/TasksPage.d.ts.map +1 -0
  169. package/dist/admin/pages/TasksPage.js +145 -0
  170. package/dist/admin/pages/TasksPage.js.map +1 -0
  171. package/dist/admin/pages/settings/TaskGeneralSettingsPage.d.ts +13 -0
  172. package/dist/admin/pages/settings/TaskGeneralSettingsPage.d.ts.map +1 -0
  173. package/dist/admin/pages/settings/TaskGeneralSettingsPage.js +75 -0
  174. package/dist/admin/pages/settings/TaskGeneralSettingsPage.js.map +1 -0
  175. package/dist/admin/pages/settings/TaskPrioritiesPage.d.ts +16 -0
  176. package/dist/admin/pages/settings/TaskPrioritiesPage.d.ts.map +1 -0
  177. package/dist/admin/pages/settings/TaskPrioritiesPage.js +75 -0
  178. package/dist/admin/pages/settings/TaskPrioritiesPage.js.map +1 -0
  179. package/dist/admin/pages/settings/TaskTagsPage.d.ts +16 -0
  180. package/dist/admin/pages/settings/TaskTagsPage.d.ts.map +1 -0
  181. package/dist/admin/pages/settings/TaskTagsPage.js +68 -0
  182. package/dist/admin/pages/settings/TaskTagsPage.js.map +1 -0
  183. package/dist/admin/pages/settings/TaskWorkflowPage.d.ts +22 -0
  184. package/dist/admin/pages/settings/TaskWorkflowPage.d.ts.map +1 -0
  185. package/dist/admin/pages/settings/TaskWorkflowPage.js +110 -0
  186. package/dist/admin/pages/settings/TaskWorkflowPage.js.map +1 -0
  187. package/dist/admin/zones/OpportunityTasksPanel.d.ts +7 -0
  188. package/dist/admin/zones/OpportunityTasksPanel.d.ts.map +1 -0
  189. package/dist/admin/zones/OpportunityTasksPanel.js +9 -0
  190. package/dist/admin/zones/OpportunityTasksPanel.js.map +1 -0
  191. package/dist/admin/zones/OrderTasksPanel.d.ts +7 -0
  192. package/dist/admin/zones/OrderTasksPanel.d.ts.map +1 -0
  193. package/dist/admin/zones/OrderTasksPanel.js +9 -0
  194. package/dist/admin/zones/OrderTasksPanel.js.map +1 -0
  195. package/dist/admin/zones/QuoteRequestTasksPanel.d.ts +7 -0
  196. package/dist/admin/zones/QuoteRequestTasksPanel.d.ts.map +1 -0
  197. package/dist/admin/zones/QuoteRequestTasksPanel.js +9 -0
  198. package/dist/admin/zones/QuoteRequestTasksPanel.js.map +1 -0
  199. package/dist/admin/zones/TasksPanel.d.ts +22 -0
  200. package/dist/admin/zones/TasksPanel.d.ts.map +1 -0
  201. package/dist/admin/zones/TasksPanel.js +59 -0
  202. package/dist/admin/zones/TasksPanel.js.map +1 -0
  203. package/dist/backend/admin-search-provider.d.ts +38 -0
  204. package/dist/backend/admin-search-provider.d.ts.map +1 -0
  205. package/dist/backend/admin-search-provider.js +48 -0
  206. package/dist/backend/admin-search-provider.js.map +1 -0
  207. package/dist/backend/domain/board-card-fields.d.ts +35 -0
  208. package/dist/backend/domain/board-card-fields.d.ts.map +1 -0
  209. package/dist/backend/domain/board-card-fields.js +98 -0
  210. package/dist/backend/domain/board-card-fields.js.map +1 -0
  211. package/dist/backend/domain/due-moment.d.ts +28 -0
  212. package/dist/backend/domain/due-moment.d.ts.map +1 -0
  213. package/dist/backend/domain/due-moment.js +66 -0
  214. package/dist/backend/domain/due-moment.js.map +1 -0
  215. package/dist/backend/domain/hierarchy.d.ts +36 -0
  216. package/dist/backend/domain/hierarchy.d.ts.map +1 -0
  217. package/dist/backend/domain/hierarchy.js +13 -0
  218. package/dist/backend/domain/hierarchy.js.map +1 -0
  219. package/dist/backend/domain/list-cursor.d.ts +27 -0
  220. package/dist/backend/domain/list-cursor.d.ts.map +1 -0
  221. package/dist/backend/domain/list-cursor.js +74 -0
  222. package/dist/backend/domain/list-cursor.js.map +1 -0
  223. package/dist/backend/domain/task-status-graph.d.ts +73 -0
  224. package/dist/backend/domain/task-status-graph.d.ts.map +1 -0
  225. package/dist/backend/domain/task-status-graph.js +90 -0
  226. package/dist/backend/domain/task-status-graph.js.map +1 -0
  227. package/dist/backend/email-templates/digest-defaults.d.ts +30 -0
  228. package/dist/backend/email-templates/digest-defaults.d.ts.map +1 -0
  229. package/dist/backend/email-templates/digest-defaults.js +50 -0
  230. package/dist/backend/email-templates/digest-defaults.js.map +1 -0
  231. package/dist/backend/email-templates/reminder-defaults.d.ts +24 -0
  232. package/dist/backend/email-templates/reminder-defaults.d.ts.map +1 -0
  233. package/dist/backend/email-templates/reminder-defaults.js +46 -0
  234. package/dist/backend/email-templates/reminder-defaults.js.map +1 -0
  235. package/dist/backend/entities/task-assignee.entity.d.ts +15 -0
  236. package/dist/backend/entities/task-assignee.entity.d.ts.map +1 -0
  237. package/dist/backend/entities/task-assignee.entity.js +47 -0
  238. package/dist/backend/entities/task-assignee.entity.js.map +1 -0
  239. package/dist/backend/entities/task-attachment.entity.d.ts +15 -0
  240. package/dist/backend/entities/task-attachment.entity.d.ts.map +1 -0
  241. package/dist/backend/entities/task-attachment.entity.js +53 -0
  242. package/dist/backend/entities/task-attachment.entity.js.map +1 -0
  243. package/dist/backend/entities/task-comment.entity.d.ts +17 -0
  244. package/dist/backend/entities/task-comment.entity.d.ts.map +1 -0
  245. package/dist/backend/entities/task-comment.entity.js +62 -0
  246. package/dist/backend/entities/task-comment.entity.js.map +1 -0
  247. package/dist/backend/entities/task-digest-subscription.entity.d.ts +15 -0
  248. package/dist/backend/entities/task-digest-subscription.entity.d.ts.map +1 -0
  249. package/dist/backend/entities/task-digest-subscription.entity.js +46 -0
  250. package/dist/backend/entities/task-digest-subscription.entity.js.map +1 -0
  251. package/dist/backend/entities/task-list-saved-view.entity.d.ts +25 -0
  252. package/dist/backend/entities/task-list-saved-view.entity.d.ts.map +1 -0
  253. package/dist/backend/entities/task-list-saved-view.entity.js +74 -0
  254. package/dist/backend/entities/task-list-saved-view.entity.js.map +1 -0
  255. package/dist/backend/entities/task-priority.entity.d.ts +17 -0
  256. package/dist/backend/entities/task-priority.entity.d.ts.map +1 -0
  257. package/dist/backend/entities/task-priority.entity.js +66 -0
  258. package/dist/backend/entities/task-priority.entity.js.map +1 -0
  259. package/dist/backend/entities/task-record-link.entity.d.ts +17 -0
  260. package/dist/backend/entities/task-record-link.entity.d.ts.map +1 -0
  261. package/dist/backend/entities/task-record-link.entity.js +58 -0
  262. package/dist/backend/entities/task-record-link.entity.js.map +1 -0
  263. package/dist/backend/entities/task-reference.entity.d.ts +21 -0
  264. package/dist/backend/entities/task-reference.entity.d.ts.map +1 -0
  265. package/dist/backend/entities/task-reference.entity.js +60 -0
  266. package/dist/backend/entities/task-reference.entity.js.map +1 -0
  267. package/dist/backend/entities/task-relation.entity.d.ts +13 -0
  268. package/dist/backend/entities/task-relation.entity.d.ts.map +1 -0
  269. package/dist/backend/entities/task-relation.entity.js +45 -0
  270. package/dist/backend/entities/task-relation.entity.js.map +1 -0
  271. package/dist/backend/entities/task-reminder-delivery.entity.d.ts +18 -0
  272. package/dist/backend/entities/task-reminder-delivery.entity.d.ts.map +1 -0
  273. package/dist/backend/entities/task-reminder-delivery.entity.js +53 -0
  274. package/dist/backend/entities/task-reminder-delivery.entity.js.map +1 -0
  275. package/dist/backend/entities/task-reminder.entity.d.ts +21 -0
  276. package/dist/backend/entities/task-reminder.entity.d.ts.map +1 -0
  277. package/dist/backend/entities/task-reminder.entity.js +70 -0
  278. package/dist/backend/entities/task-reminder.entity.js.map +1 -0
  279. package/dist/backend/entities/task-status-transition.entity.d.ts +14 -0
  280. package/dist/backend/entities/task-status-transition.entity.d.ts.map +1 -0
  281. package/dist/backend/entities/task-status-transition.entity.js +48 -0
  282. package/dist/backend/entities/task-status-transition.entity.js.map +1 -0
  283. package/dist/backend/entities/task-status.entity.d.ts +29 -0
  284. package/dist/backend/entities/task-status.entity.d.ts.map +1 -0
  285. package/dist/backend/entities/task-status.entity.js +85 -0
  286. package/dist/backend/entities/task-status.entity.js.map +1 -0
  287. package/dist/backend/entities/task-tag-assignment.entity.d.ts +10 -0
  288. package/dist/backend/entities/task-tag-assignment.entity.d.ts.map +1 -0
  289. package/dist/backend/entities/task-tag-assignment.entity.js +35 -0
  290. package/dist/backend/entities/task-tag-assignment.entity.js.map +1 -0
  291. package/dist/backend/entities/task-tag.entity.d.ts +14 -0
  292. package/dist/backend/entities/task-tag.entity.d.ts.map +1 -0
  293. package/dist/backend/entities/task-tag.entity.js +50 -0
  294. package/dist/backend/entities/task-tag.entity.js.map +1 -0
  295. package/dist/backend/entities/task.entity.d.ts +66 -0
  296. package/dist/backend/entities/task.entity.d.ts.map +1 -0
  297. package/dist/backend/entities/task.entity.js +175 -0
  298. package/dist/backend/entities/task.entity.js.map +1 -0
  299. package/dist/backend/index.d.ts +40 -0
  300. package/dist/backend/index.d.ts.map +1 -0
  301. package/dist/backend/index.js +642 -0
  302. package/dist/backend/index.js.map +1 -0
  303. package/dist/backend/routes/routes.board.d.ts +21 -0
  304. package/dist/backend/routes/routes.board.d.ts.map +1 -0
  305. package/dist/backend/routes/routes.board.js +28 -0
  306. package/dist/backend/routes/routes.board.js.map +1 -0
  307. package/dist/backend/routes/routes.collaboration.d.ts +30 -0
  308. package/dist/backend/routes/routes.collaboration.d.ts.map +1 -0
  309. package/dist/backend/routes/routes.collaboration.js +124 -0
  310. package/dist/backend/routes/routes.collaboration.js.map +1 -0
  311. package/dist/backend/routes/routes.priorities.d.ts +15 -0
  312. package/dist/backend/routes/routes.priorities.d.ts.map +1 -0
  313. package/dist/backend/routes/routes.priorities.js +27 -0
  314. package/dist/backend/routes/routes.priorities.js.map +1 -0
  315. package/dist/backend/routes/routes.reminders.d.ts +23 -0
  316. package/dist/backend/routes/routes.reminders.d.ts.map +1 -0
  317. package/dist/backend/routes/routes.reminders.js +36 -0
  318. package/dist/backend/routes/routes.reminders.js.map +1 -0
  319. package/dist/backend/routes/routes.settings.d.ts +16 -0
  320. package/dist/backend/routes/routes.settings.d.ts.map +1 -0
  321. package/dist/backend/routes/routes.settings.js +19 -0
  322. package/dist/backend/routes/routes.settings.js.map +1 -0
  323. package/dist/backend/routes/routes.tags.d.ts +15 -0
  324. package/dist/backend/routes/routes.tags.d.ts.map +1 -0
  325. package/dist/backend/routes/routes.tags.js +27 -0
  326. package/dist/backend/routes/routes.tags.js.map +1 -0
  327. package/dist/backend/routes/routes.tasks.d.ts +42 -0
  328. package/dist/backend/routes/routes.tasks.d.ts.map +1 -0
  329. package/dist/backend/routes/routes.tasks.js +109 -0
  330. package/dist/backend/routes/routes.tasks.js.map +1 -0
  331. package/dist/backend/routes/routes.views.d.ts +17 -0
  332. package/dist/backend/routes/routes.views.d.ts.map +1 -0
  333. package/dist/backend/routes/routes.views.js +29 -0
  334. package/dist/backend/routes/routes.views.js.map +1 -0
  335. package/dist/backend/routes/routes.workflow.d.ts +19 -0
  336. package/dist/backend/routes/routes.workflow.d.ts.map +1 -0
  337. package/dist/backend/routes/routes.workflow.js +34 -0
  338. package/dist/backend/routes/routes.workflow.js.map +1 -0
  339. package/dist/backend/saved-view-actor.d.ts +16 -0
  340. package/dist/backend/saved-view-actor.d.ts.map +1 -0
  341. package/dist/backend/saved-view-actor.js +24 -0
  342. package/dist/backend/saved-view-actor.js.map +1 -0
  343. package/dist/backend/services/attachment-active-content.d.ts +22 -0
  344. package/dist/backend/services/attachment-active-content.d.ts.map +1 -0
  345. package/dist/backend/services/attachment-active-content.js +80 -0
  346. package/dist/backend/services/attachment-active-content.js.map +1 -0
  347. package/dist/backend/services/attachment-service.d.ts +71 -0
  348. package/dist/backend/services/attachment-service.d.ts.map +1 -0
  349. package/dist/backend/services/attachment-service.js +236 -0
  350. package/dist/backend/services/attachment-service.js.map +1 -0
  351. package/dist/backend/services/board-card-field-service.d.ts +36 -0
  352. package/dist/backend/services/board-card-field-service.d.ts.map +1 -0
  353. package/dist/backend/services/board-card-field-service.js +71 -0
  354. package/dist/backend/services/board-card-field-service.js.map +1 -0
  355. package/dist/backend/services/board-service.d.ts +38 -0
  356. package/dist/backend/services/board-service.d.ts.map +1 -0
  357. package/dist/backend/services/board-service.js +57 -0
  358. package/dist/backend/services/board-service.js.map +1 -0
  359. package/dist/backend/services/comment-service.d.ts +61 -0
  360. package/dist/backend/services/comment-service.d.ts.map +1 -0
  361. package/dist/backend/services/comment-service.js +219 -0
  362. package/dist/backend/services/comment-service.js.map +1 -0
  363. package/dist/backend/services/context-lookup.d.ts +19 -0
  364. package/dist/backend/services/context-lookup.d.ts.map +1 -0
  365. package/dist/backend/services/context-lookup.js +53 -0
  366. package/dist/backend/services/context-lookup.js.map +1 -0
  367. package/dist/backend/services/digest-service.d.ts +88 -0
  368. package/dist/backend/services/digest-service.d.ts.map +1 -0
  369. package/dist/backend/services/digest-service.js +212 -0
  370. package/dist/backend/services/digest-service.js.map +1 -0
  371. package/dist/backend/services/document-lookup-service.d.ts +40 -0
  372. package/dist/backend/services/document-lookup-service.d.ts.map +1 -0
  373. package/dist/backend/services/document-lookup-service.js +67 -0
  374. package/dist/backend/services/document-lookup-service.js.map +1 -0
  375. package/dist/backend/services/hierarchy-service.d.ts +66 -0
  376. package/dist/backend/services/hierarchy-service.d.ts.map +1 -0
  377. package/dist/backend/services/hierarchy-service.js +132 -0
  378. package/dist/backend/services/hierarchy-service.js.map +1 -0
  379. package/dist/backend/services/maintenance-service.d.ts +61 -0
  380. package/dist/backend/services/maintenance-service.d.ts.map +1 -0
  381. package/dist/backend/services/maintenance-service.js +119 -0
  382. package/dist/backend/services/maintenance-service.js.map +1 -0
  383. package/dist/backend/services/mention-service.d.ts +70 -0
  384. package/dist/backend/services/mention-service.d.ts.map +1 -0
  385. package/dist/backend/services/mention-service.js +113 -0
  386. package/dist/backend/services/mention-service.js.map +1 -0
  387. package/dist/backend/services/owner-read-permissions.d.ts +50 -0
  388. package/dist/backend/services/owner-read-permissions.d.ts.map +1 -0
  389. package/dist/backend/services/owner-read-permissions.js +58 -0
  390. package/dist/backend/services/owner-read-permissions.js.map +1 -0
  391. package/dist/backend/services/priority-service.d.ts +76 -0
  392. package/dist/backend/services/priority-service.d.ts.map +1 -0
  393. package/dist/backend/services/priority-service.js +188 -0
  394. package/dist/backend/services/priority-service.js.map +1 -0
  395. package/dist/backend/services/record-link-service.d.ts +73 -0
  396. package/dist/backend/services/record-link-service.d.ts.map +1 -0
  397. package/dist/backend/services/record-link-service.js +187 -0
  398. package/dist/backend/services/record-link-service.js.map +1 -0
  399. package/dist/backend/services/record-owners.d.ts +52 -0
  400. package/dist/backend/services/record-owners.d.ts.map +1 -0
  401. package/dist/backend/services/record-owners.js +54 -0
  402. package/dist/backend/services/record-owners.js.map +1 -0
  403. package/dist/backend/services/reference-service.d.ts +77 -0
  404. package/dist/backend/services/reference-service.d.ts.map +1 -0
  405. package/dist/backend/services/reference-service.js +179 -0
  406. package/dist/backend/services/reference-service.js.map +1 -0
  407. package/dist/backend/services/relation-service.d.ts +39 -0
  408. package/dist/backend/services/relation-service.d.ts.map +1 -0
  409. package/dist/backend/services/relation-service.js +77 -0
  410. package/dist/backend/services/relation-service.js.map +1 -0
  411. package/dist/backend/services/reminder-schedule.d.ts +28 -0
  412. package/dist/backend/services/reminder-schedule.d.ts.map +1 -0
  413. package/dist/backend/services/reminder-schedule.js +60 -0
  414. package/dist/backend/services/reminder-schedule.js.map +1 -0
  415. package/dist/backend/services/reminder-service.d.ts +93 -0
  416. package/dist/backend/services/reminder-service.d.ts.map +1 -0
  417. package/dist/backend/services/reminder-service.js +370 -0
  418. package/dist/backend/services/reminder-service.js.map +1 -0
  419. package/dist/backend/services/saved-view-service.d.ts +65 -0
  420. package/dist/backend/services/saved-view-service.d.ts.map +1 -0
  421. package/dist/backend/services/saved-view-service.js +206 -0
  422. package/dist/backend/services/saved-view-service.js.map +1 -0
  423. package/dist/backend/services/scheduled-work-probe.d.ts +34 -0
  424. package/dist/backend/services/scheduled-work-probe.d.ts.map +1 -0
  425. package/dist/backend/services/scheduled-work-probe.js +30 -0
  426. package/dist/backend/services/scheduled-work-probe.js.map +1 -0
  427. package/dist/backend/services/tag-service.d.ts +53 -0
  428. package/dist/backend/services/tag-service.d.ts.map +1 -0
  429. package/dist/backend/services/tag-service.js +165 -0
  430. package/dist/backend/services/tag-service.js.map +1 -0
  431. package/dist/backend/services/task-access.d.ts +95 -0
  432. package/dist/backend/services/task-access.d.ts.map +1 -0
  433. package/dist/backend/services/task-access.js +183 -0
  434. package/dist/backend/services/task-access.js.map +1 -0
  435. package/dist/backend/services/task-asset-references.d.ts +42 -0
  436. package/dist/backend/services/task-asset-references.d.ts.map +1 -0
  437. package/dist/backend/services/task-asset-references.js +52 -0
  438. package/dist/backend/services/task-asset-references.js.map +1 -0
  439. package/dist/backend/services/task-audit-references.d.ts +18 -0
  440. package/dist/backend/services/task-audit-references.d.ts.map +1 -0
  441. package/dist/backend/services/task-audit-references.js +26 -0
  442. package/dist/backend/services/task-audit-references.js.map +1 -0
  443. package/dist/backend/services/task-checks.d.ts +78 -0
  444. package/dist/backend/services/task-checks.d.ts.map +1 -0
  445. package/dist/backend/services/task-checks.js +148 -0
  446. package/dist/backend/services/task-checks.js.map +1 -0
  447. package/dist/backend/services/task-commands.d.ts +199 -0
  448. package/dist/backend/services/task-commands.d.ts.map +1 -0
  449. package/dist/backend/services/task-commands.js +483 -0
  450. package/dist/backend/services/task-commands.js.map +1 -0
  451. package/dist/backend/services/task-context-registry.d.ts +34 -0
  452. package/dist/backend/services/task-context-registry.d.ts.map +1 -0
  453. package/dist/backend/services/task-context-registry.js +49 -0
  454. package/dist/backend/services/task-context-registry.js.map +1 -0
  455. package/dist/backend/services/task-custom-fields.d.ts +21 -0
  456. package/dist/backend/services/task-custom-fields.d.ts.map +1 -0
  457. package/dist/backend/services/task-custom-fields.js +34 -0
  458. package/dist/backend/services/task-custom-fields.js.map +1 -0
  459. package/dist/backend/services/task-email.d.ts +116 -0
  460. package/dist/backend/services/task-email.d.ts.map +1 -0
  461. package/dist/backend/services/task-email.js +128 -0
  462. package/dist/backend/services/task-email.js.map +1 -0
  463. package/dist/backend/services/task-errors.d.ts +34 -0
  464. package/dist/backend/services/task-errors.d.ts.map +1 -0
  465. package/dist/backend/services/task-errors.js +56 -0
  466. package/dist/backend/services/task-errors.js.map +1 -0
  467. package/dist/backend/services/task-history-service.d.ts +34 -0
  468. package/dist/backend/services/task-history-service.d.ts.map +1 -0
  469. package/dist/backend/services/task-history-service.js +185 -0
  470. package/dist/backend/services/task-history-service.js.map +1 -0
  471. package/dist/backend/services/task-notifier.d.ts +85 -0
  472. package/dist/backend/services/task-notifier.d.ts.map +1 -0
  473. package/dist/backend/services/task-notifier.js +96 -0
  474. package/dist/backend/services/task-notifier.js.map +1 -0
  475. package/dist/backend/services/task-number.d.ts +17 -0
  476. package/dist/backend/services/task-number.d.ts.map +1 -0
  477. package/dist/backend/services/task-number.js +30 -0
  478. package/dist/backend/services/task-number.js.map +1 -0
  479. package/dist/backend/services/task-read-port.d.ts +25 -0
  480. package/dist/backend/services/task-read-port.d.ts.map +1 -0
  481. package/dist/backend/services/task-read-port.js +38 -0
  482. package/dist/backend/services/task-read-port.js.map +1 -0
  483. package/dist/backend/services/task-reassignment.d.ts +43 -0
  484. package/dist/backend/services/task-reassignment.d.ts.map +1 -0
  485. package/dist/backend/services/task-reassignment.js +41 -0
  486. package/dist/backend/services/task-reassignment.js.map +1 -0
  487. package/dist/backend/services/task-service.d.ts +219 -0
  488. package/dist/backend/services/task-service.d.ts.map +1 -0
  489. package/dist/backend/services/task-service.js +1112 -0
  490. package/dist/backend/services/task-service.js.map +1 -0
  491. package/dist/backend/services/task-settings-service.d.ts +23 -0
  492. package/dist/backend/services/task-settings-service.d.ts.map +1 -0
  493. package/dist/backend/services/task-settings-service.js +30 -0
  494. package/dist/backend/services/task-settings-service.js.map +1 -0
  495. package/dist/backend/services/task-transition-service.d.ts +56 -0
  496. package/dist/backend/services/task-transition-service.d.ts.map +1 -0
  497. package/dist/backend/services/task-transition-service.js +125 -0
  498. package/dist/backend/services/task-transition-service.js.map +1 -0
  499. package/dist/backend/services/task-visibility.d.ts +102 -0
  500. package/dist/backend/services/task-visibility.d.ts.map +1 -0
  501. package/dist/backend/services/task-visibility.js +106 -0
  502. package/dist/backend/services/task-visibility.js.map +1 -0
  503. package/dist/backend/services/task-workflow-read.d.ts +15 -0
  504. package/dist/backend/services/task-workflow-read.d.ts.map +1 -0
  505. package/dist/backend/services/task-workflow-read.js +53 -0
  506. package/dist/backend/services/task-workflow-read.js.map +1 -0
  507. package/dist/backend/services/task-write-port.d.ts +65 -0
  508. package/dist/backend/services/task-write-port.d.ts.map +1 -0
  509. package/dist/backend/services/task-write-port.js +115 -0
  510. package/dist/backend/services/task-write-port.js.map +1 -0
  511. package/dist/backend/services/time-zone-validator.d.ts +15 -0
  512. package/dist/backend/services/time-zone-validator.d.ts.map +1 -0
  513. package/dist/backend/services/time-zone-validator.js +28 -0
  514. package/dist/backend/services/time-zone-validator.js.map +1 -0
  515. package/dist/backend/services/workflow-config-service.d.ts +69 -0
  516. package/dist/backend/services/workflow-config-service.d.ts.map +1 -0
  517. package/dist/backend/services/workflow-config-service.js +262 -0
  518. package/dist/backend/services/workflow-config-service.js.map +1 -0
  519. package/dist/backend/workers/tasks-reminders-worker.d.ts +102 -0
  520. package/dist/backend/workers/tasks-reminders-worker.d.ts.map +1 -0
  521. package/dist/backend/workers/tasks-reminders-worker.js +134 -0
  522. package/dist/backend/workers/tasks-reminders-worker.js.map +1 -0
  523. package/dist/manifest.d.ts +174 -0
  524. package/dist/manifest.d.ts.map +1 -0
  525. package/dist/manifest.js +374 -0
  526. package/dist/manifest.js.map +1 -0
  527. package/dist/migrations/20261026T133731_tasks_init.d.ts +23 -0
  528. package/dist/migrations/20261026T133731_tasks_init.d.ts.map +1 -0
  529. package/dist/migrations/20261026T133731_tasks_init.js +61 -0
  530. package/dist/migrations/20261026T133731_tasks_init.js.map +1 -0
  531. package/dist/migrations/20261028T140002_tasks_task_management.d.ts +34 -0
  532. package/dist/migrations/20261028T140002_tasks_task_management.d.ts.map +1 -0
  533. package/dist/migrations/20261028T140002_tasks_task_management.js +371 -0
  534. package/dist/migrations/20261028T140002_tasks_task_management.js.map +1 -0
  535. package/dist/migrations/index.d.ts +16 -0
  536. package/dist/migrations/index.d.ts.map +1 -0
  537. package/dist/migrations/index.js +16 -0
  538. package/dist/migrations/index.js.map +1 -0
  539. package/docs/tasks.md +597 -0
  540. package/i18n/en.json +568 -0
  541. package/i18n/pl.json +568 -0
  542. package/package.json +102 -3
  543. package/tailwind.css +14 -0
package/docs/tasks.md ADDED
@@ -0,0 +1,597 @@
1
+ ---
2
+ title: Tasks
3
+ description: Tasks for administrators — several assignees, due dates, priorities, tags, an operator-defined workflow, a list and a board, comments, sub-tasks, links, reminders and a daily digest — which other modules can own through a Task context
4
+ ---
5
+
6
+ # Tasks (`tasks`)
7
+
8
+ The Tasks module keeps **tasks**: a piece of work for the people who use the
9
+ Admin UI. A task has a title, a formatted description, any number of
10
+ assignees, a due date (optionally with a time), a start date, a priority, tags,
11
+ custom fields and attachments. It moves through statuses the operator defines,
12
+ is shown as a list or as a board, can be discussed in comments, broken into
13
+ sub-tasks, linked to the opportunities, orders and quote requests it is about,
14
+ and reminds people of itself.
15
+
16
+ ## What it does
17
+
18
+ Every task has a number, such as `TSK-000042`, given when it is created and
19
+ never reused.
20
+
21
+ **Statuses.** A task is always in one **status** of the operator's
22
+ **workflow**: the statuses, and the moves allowed between them (see
23
+ *Configuring Tasks*). Each status belongs to one **category** — *open*,
24
+ *finished* or *cancelled*. A task in a finished or cancelled status is
25
+ **closed**; every other task is **open**. A new task starts in the workflow's
26
+ start status. A fresh installation has four statuses, any of which may follow
27
+ any other:
28
+
29
+ | Status | Category |
30
+ | --- | --- |
31
+ | *To do* (`todo`) | open — the start status |
32
+ | *In progress* (`in_progress`) | open |
33
+ | *Done* (`done`) | finished |
34
+ | *Cancelled* (`cancelled`) | cancelled |
35
+
36
+ When a task enters a finished status the moment is recorded; leaving it clears
37
+ it again.
38
+
39
+ **Due date.** A task can have a due date, and with it a time of day. With a
40
+ time it is **overdue** from that moment while it is open; with a date alone,
41
+ from the start of the next day. Dates are counted in the time zone of the
42
+ Tasks module's settings (see *Settings*).
43
+
44
+ **Who sees a task.** A task can stand on its own, or belong to a record another
45
+ module owns — a project and one of its stages, for example. That record is the
46
+ task's **context**. A task with no context is visible to everybody allowed to
47
+ see tasks. A task with a context is visible only to the people the context's
48
+ own module says may see that record: someone who may not see a project does
49
+ not see its tasks either, anywhere — not in a list, on the board, in search,
50
+ in a reference or by its address. To them such a task does not exist.
51
+
52
+ Two more kinds of task are seen by fewer people:
53
+
54
+ - A **draft** is seen only by the person who created it — nobody else, whatever
55
+ their permissions. Nobody is told about a draft and no reminder of it fires;
56
+ it counts towards no project's completion gate. Its creator **publishes** it
57
+ when it is ready; a published task cannot become a draft again.
58
+ - A **private** task is seen only by the person who created it and by holders
59
+ of *See private tasks* — for example when its creator has left the company. A
60
+ private task belongs to no record and can be assigned only to its creator.
61
+
62
+ A task can be both. Linking a task to an opportunity, an order or a quote
63
+ request does **not** change who sees it.
64
+
65
+ If the module that owns a context is switched off, the tasks of that context
66
+ disappear from the Tasks module until it is switched back on; nothing is
67
+ deleted.
68
+
69
+ ## In the Admin UI
70
+
71
+ Tasks are in the sidebar under **Projects & tasks**: **My tasks**
72
+ (`/tasks/mine`) and **Tasks** (`/tasks`) for administrators who may view
73
+ tasks, and **Task settings** for those who configure them.
74
+
75
+ **Tasks** (`/tasks`) shows every task you may see, as a **list** or a
76
+ **board** — switch with *View*. The choice is remembered for you, on every
77
+ device you sign in from, and so are the filters you set while switching.
78
+
79
+ - **The list** shows each task's number, title, status, priority, tags, due
80
+ date — marked *Overdue* once it has passed while the task is open —
81
+ assignees, and the record it belongs to. That record is a link while it is
82
+ available to you; one you may no longer see, or whose module is switched off,
83
+ is named *Unavailable record*, without a link. *Sort by* orders it by when it
84
+ was created or last changed, due date, priority, status (in workflow order),
85
+ number or title. It pages forward and back, fifty tasks at a time.
86
+ - **The board** has one column per status, in workflow order, each stating how
87
+ many tasks it holds and showing the first of them, with *Show more*. A card
88
+ shows the task's title and the fields the operator chose (see *Configuring
89
+ Tasks*) — by default its number, assignees, due date, priority and tags. Drag a card to another column to move the
90
+ task there; with the keyboard, pick it up with Space or Enter, choose the
91
+ column with the arrow keys, and drop it — or use the card's *Move to…* menu.
92
+ A move the workflow does not allow is refused, and the card stays where it
93
+ was. Without the permission to change tasks the board can be viewed but not
94
+ moved.
95
+ - **Filters**, the same for the list and the board: status, open or closed,
96
+ assignee (anyone, you, or nobody), created by (anyone or you), priority, tags
97
+ (every one chosen), due from and until, only overdue tasks, only sub-tasks,
98
+ only top-level tasks or only tasks with sub-tasks, only your drafts, only
99
+ private tasks, the task custom fields marked as list filters, and a search by
100
+ number or title. A *Tasks* panel's *Show in the task list* opens the list of
101
+ one record's tasks, with *Show all tasks* to go back.
102
+ - **Saved views** keep a set of filters under a name, for you alone or shared
103
+ with everyone who may view tasks, and apply to the list and the board alike.
104
+ Only the person who saved a view, or a platform administrator, may change or
105
+ delete it. A view that names a status, priority, tag or person that no longer
106
+ exists still opens, leaving that value out and saying so.
107
+
108
+ **My tasks** (`/tasks/mine`) is your own open work: the published tasks
109
+ assigned to you that are not closed, the soonest due first and those without a
110
+ due date last, as a list or a board, with the same filters. Your drafts are not
111
+ in it — find them with the *Only my drafts* filter on **Tasks**. The **Daily
112
+ digest** control at its top turns your digest on and off and sets its hour.
113
+
114
+ **New task** (`/tasks/new`) asks for a title and, optionally, a description,
115
+ assignees — chosen by name among the active administrators who may view tasks,
116
+ or with *Assign to me* — a due date and time, a start date, a priority and
117
+ tags. *Create task* publishes it; *Save as draft* keeps it to yourself.
118
+ *Private* limits the assignees to you. A task created here belongs to no
119
+ record: a task of a project is added on the project's *Tasks* tab, into one of
120
+ its stages. Started from a record's *Tasks* panel, the task is linked to that
121
+ record; started from a task's *Add sub-task*, it is that task's sub-task.
122
+
123
+ **A task's screen** shows its number and title, its status — offering only the
124
+ moves the workflow allows — and *Draft* or *Private* when it is one. A draft
125
+ shows *Publish* to its creator; the creator of a task with no record can switch
126
+ *Private* on and off. Then:
127
+
128
+ - **Details** — the description, with its references as links; assignees, due
129
+ date and time, start date, priority and tags, changed with *Edit* and saved
130
+ together; *Assign to me*; who created the task and when, and when it was
131
+ finished. *Delete task* asks before it deletes, and says how many sub-tasks
132
+ the task has: they become top-level tasks, they are not deleted. It is not
133
+ offered for a task of a record you may not change — a project you may not
134
+ edit — and the screen says why.
135
+ - **Sub-tasks** — how many are done of how many, each with its status,
136
+ assignees and due date; *Add sub-task* and *Make sub-task of…*. A sub-task
137
+ names its parent, with *Remove from parent*.
138
+ - **Comments**, **Attachments** and **History**.
139
+ - Beside them: **Reminders**, **Belongs to** — the record the task belongs to,
140
+ as its module names it, with *Place in a record*, *Move* and *Remove from the
141
+ record* — **Linked records**, **Related tasks** and the task's **custom
142
+ fields**.
143
+
144
+ Other modules can add panels at the end of a task's screen. Without the
145
+ permission to change tasks the screen is read-only.
146
+
147
+ **On other records.** The screens of an **opportunity**, an **order** and a
148
+ **quote request** end with a **Tasks** panel: the tasks linked to it that you
149
+ may see, with their status, assignees and due date, *Add task* — a new task
150
+ already linked to the record — and *Show in the task list*.
151
+
152
+ **The command palette** (⌘K / CTRL+K) offers *Tasks*, *My tasks*, *New task*,
153
+ *Task statuses and workflow*, *Task priorities* and *Task tags*, each to
154
+ administrators with the permission its screen needs. The Admin UI's **global
155
+ search** finds a task by its number or its title — only among the tasks you may
156
+ see.
157
+
158
+ ## Using Tasks
159
+
160
+ **Creating a task.** A task needs only a title. It gets its number, starts in
161
+ the workflow's start status, and remembers who created it. It can be placed in
162
+ a record of another module — in this release, a stage of a project the creator
163
+ may see and edit; a task of a project always belongs to one of its stages. A
164
+ private task cannot be placed in a record.
165
+
166
+ **The description** is formatted text — bold, italic, strikethrough, links,
167
+ bulleted and numbered lists — written with the editor opportunities and
168
+ projects use. It can **refer** to things as you type: `@` a person, `@@` a
169
+ document — an order, a quote request, a task, an opportunity or a project, in
170
+ one grouped list — and `@@@` a product. Each group is offered only while its
171
+ module is switched on, and only to somebody who may read that kind of record. A
172
+ reference is shown as a link with the current number or name of what it refers
173
+ to, to whoever may see that; to anybody else, once it is gone, or while its
174
+ module is switched off, it is shown as unavailable and reveals nothing about
175
+ it. A description written before formatting existed reads as it did.
176
+
177
+ **Assignees.** A task has any number of assignees, up to twenty — each an
178
+ active administrator who may view tasks and, for a task of a record such as a
179
+ project, who may see that record. Assigning anybody else is refused, naming
180
+ them, and the assignee picker — on a task's screen, and on the new-task form
181
+ started inside a record — offers only those who may. Moving a task into another
182
+ record asks the same of the assignees it keeps. Somebody who loses sight of the
183
+ project after being assigned stays on the task, is not told about it, and does
184
+ not find it in *My tasks*. An assignee whose account is later deactivated stays on the
185
+ task, marked *inactive*; nobody is told anything on their behalf, and they can
186
+ be removed.
187
+
188
+ **Telling people.** In the Admin UI's notification bell, by the task's number
189
+ only — never its text — with a link to the task:
190
+
191
+ - a new assignee, when a task is created or assigned to them later, unless they
192
+ assigned it themselves;
193
+ - a person **newly mentioned** in the description or in a comment, once;
194
+ - on a new **comment**, the task's assignees and its creator, except the
195
+ author — and somebody both mentioned in it and assigned is told once.
196
+
197
+ Nobody is told about a task they may not see, about a draft, or by themselves.
198
+ While the *Admin notifications* module is switched off everything works the
199
+ same and nobody is told.
200
+
201
+ Every administrator has the bell and reads their own notifications on it,
202
+ whatever their role: no permission is needed for that. The *View notifications
203
+ sent to all admins* permission only adds the notifications addressed to every
204
+ administrator at once.
205
+
206
+ **Changing a status.** A task moves only along a move the workflow allows; any
207
+ other is refused, naming the statuses it may move to. The status control and
208
+ the board offer only the allowed ones. Closing a task whose sub-tasks are still
209
+ open is allowed: you are told how many are still open, and they are not closed.
210
+
211
+ **Priority and tags.** A task has at most one priority from the operator's list
212
+ — *Urgent*, *High*, *Normal* and *Low* until the operator changes it — and up
213
+ to fifty tags. Anybody who may change tasks chooses among the existing tags;
214
+ only somebody who configures tasks creates one.
215
+
216
+ **Custom fields.** The custom fields an operator defines for **tasks** on the
217
+ *Custom fields* screen are shown and saved on a task like an opportunity's, can
218
+ filter the list and the board when marked as list filters, and can be shown on
219
+ a board card.
220
+
221
+ **Attachments.** A file of up to 25 MB can be attached to a task — uploaded, or
222
+ chosen from the media library by somebody who may read it. HTML, SVG, XML and
223
+ JavaScript files are refused. Each attachment shows its name, size, who
224
+ attached it and when, and can be downloaded by anybody who may see the task and
225
+ removed by somebody who may change it. The file stays in the media library, and
226
+ the library refuses to delete a file a task uses — also while Tasks is
227
+ switched off. In the media library, a file used only by tasks somebody may not
228
+ see — private, draft, or of a record hidden from them — is hidden from them too,
229
+ and a file of a task cannot be attached elsewhere by somebody who may not see
230
+ that task.
231
+
232
+ **Comments.** Everybody who may see a task can comment on it, with the
233
+ description's editor and references. Comments are listed oldest first, with
234
+ their author and time. Only its author edits or deletes a comment; a deleted
235
+ comment leaves a mark saying it was deleted, and the history keeps that it was
236
+ written.
237
+
238
+ **Sub-tasks and related tasks.** A task has at most one parent. A task cannot
239
+ become a sub-task of itself or of one of its own sub-tasks, and nesting deeper
240
+ than five levels is refused. A parent shows how many of its sub-tasks are done
241
+ out of how many, in the list, on its board card and on its screen — counting
242
+ only the sub-tasks you may see. Deleting a parent makes its sub-tasks top-level
243
+ tasks. Two tasks can be linked as **related**: the link shows on both and can
244
+ be removed from either; it needs the permission to change both.
245
+
246
+ **Linked records.** A task can be linked to up to twenty opportunities, orders
247
+ and quote requests — each by somebody who may read it — besides the one
248
+ record it may belong to. Linking a record twice keeps one link. A linked record
249
+ you may not see, one that is gone, or one whose module is switched off is shown
250
+ as *Unavailable record*; the link is kept, and shows the record again when its
251
+ module is back.
252
+
253
+ **Reminders.** Somebody who may change a task can add up to ten reminders to
254
+ it, each **at a date and time** or **before the due date** — 15 minutes, an
255
+ hour, a day, two days or a week before — for themselves and any of the task's
256
+ assignees. At that moment each recipient gets one notification in the bell and
257
+ one e-mail naming the task, with a link. A reminder before the due date moves
258
+ with the due date, and fires again at the new moment; when the due date is
259
+ removed, the reminder is removed too and the task's history says so. Nothing is
260
+ sent to a recipient who may no longer see the task, who has been deactivated,
261
+ or about a task that is closed, deleted or a draft. If the platform was down at
262
+ the moment, the reminder is sent once when it is back — if the moment is less
263
+ than 24 hours past; an older one is not sent. You see the reminders you set and
264
+ those that name you; *Sent* marks one that has gone out. A reminder can be
265
+ removed by whoever set it, or by somebody who may change the task.
266
+
267
+ **The daily digest.** Turn it on, on *My tasks*, and choose an hour: each day at
268
+ that hour in the Tasks time zone you get one notification and one e-mail
269
+ listing your open tasks due that day and those overdue. On a day with none,
270
+ nothing is sent; a task that becomes due later that day is in the next day's
271
+ digest. The digest is off until you turn it on.
272
+
273
+ **Drafts and private tasks.** *Save as draft* keeps a new task to yourself:
274
+ nobody is told about it, no reminder of it fires, and nobody else finds it
275
+ anywhere — not even a holder of *See private tasks*. *Publish* makes it a normal
276
+ task, and its assignees and the people its description mentions are told as
277
+ for a new task. A private task is shown with *Private*; a holder of *See
278
+ private tasks* may read and delete somebody else's private task, and change
279
+ nothing about it.
280
+
281
+ **Deleting a task** removes it for good; its sub-tasks become top-level tasks.
282
+
283
+ Adding a task to a record, taking one out of it — to no record or to another
284
+ one — and deleting a task of a record are changes to that record's work, so
285
+ the record's module decides who may make them: for a project, somebody who may
286
+ edit the project. Moving a task between the stages of one project, and every
287
+ other change to a task, needs only the permission to change tasks.
288
+
289
+ **History.** Every change of a task — its fields, assignees, status, priority,
290
+ tags, parent, links, attachments, reminders, comments edited or deleted,
291
+ publication and privacy — is recorded with who did it and when, and the task's
292
+ history lists them, newest first. The history records the length of a
293
+ description, never its text. A project the task has left, and you may not see,
294
+ is not named in it.
295
+
296
+ ## Configuring Tasks
297
+
298
+ Holders of *Configure tasks* reach these screens from **Task settings** in the
299
+ sidebar and from the command palette; each links to the others.
300
+
301
+ **Statuses and workflow** (`/tasks/settings/workflow`). Add, rename — in English
302
+ and in Polish — recolour, reorder and remove statuses; mark the start status;
303
+ add and remove moves on the workflow graph, the editor orders and opportunities
304
+ use. A workflow is refused unless exactly one status is the start status and is
305
+ open, at least one is finished and at least one is cancelled. A status tasks
306
+ are in cannot change its category, and is removed only by choosing the status
307
+ its tasks move to — each move recorded in that task's history. On the same
308
+ screen, **Board card** chooses which fields a board card shows, and in what
309
+ order — at most six of: number, assignees, due date, priority, tags, start
310
+ date, the record it belongs to, sub-tasks done, created, last changed, and any
311
+ task custom field.
312
+
313
+ **Priorities** (`/tasks/settings/priorities`). Add, rename — in English and in
314
+ Polish — recolour and reorder priorities; sorting by priority follows that
315
+ order, the most urgent first, tasks without one last. Removing a priority tasks
316
+ have asks which priority — or none — they get instead, and records that in each
317
+ task's history.
318
+
319
+ **Tags** (`/tasks/settings/tags`). Add, rename, recolour and delete tags. Names
320
+ are unique whatever their letter case, up to 64 characters. Deleting a tag asks
321
+ for confirmation and removes it from every task that carries it; the deletion is
322
+ recorded once, on the tag, with how many tasks carried it.
323
+
324
+ **General settings** (`/tasks/settings/general`). The **time zone** in which
325
+ Tasks counts "today": when a task with a due date alone becomes overdue, when a
326
+ reminder before such a date fires, and the hour of the daily digest.
327
+
328
+ ## Settings
329
+
330
+ | Code | Default | Meaning |
331
+ | --- | --- | --- |
332
+ | `tasks.enabled` | on | Whether the module is switched on — change it on the **Modules** screen. |
333
+ | `tasks.time_zone` | `Europe/Warsaw` | The IANA time zone Tasks counts dates in. Change it on **Task settings → General settings**. |
334
+ | `tasks.board_card_fields` | number, assignees, due date, priority, tags | The fields a board card shows, in order. Change it in the **Board card** section of **Task settings**, which offers the fields that exist. |
335
+
336
+ ## Switching it on and off
337
+
338
+ Tasks is an optional module. It is on by default and an operator switches it
339
+ off, and back on, on the **Modules** screen of the Admin UI
340
+ (`/platform/modules`).
341
+
342
+ While it is off:
343
+
344
+ - the *My tasks*, *Tasks* and *Task settings* entries and every task screen are
345
+ gone from the Admin UI, and so are a project's *Tasks* tab and its stage
346
+ tasks, the *Tasks* panels of opportunities, orders and quote requests, the
347
+ command-palette actions and tasks in the global search;
348
+ - every `/api/v1/admin/tasks…` endpoint answers `503` with the code
349
+ `MODULE_DISABLED`, and its settings cannot be changed;
350
+ - no reminder and no digest is sent, and nothing accumulates: when the module
351
+ is back, a reminder whose moment passed less than 24 hours earlier is sent
352
+ once, an older one never, and only that day's digest goes;
353
+ - its permissions can no longer be granted to a role;
354
+ - other modules can neither read nor create tasks: a module that offers tasks
355
+ as part of its own screens shows them as unavailable, and a task referred to
356
+ in their texts reads as unavailable.
357
+
358
+ Nothing is deleted. Every task stays in the database, and everything is back
359
+ exactly as it was when the module is switched on again. A project — or a stage
360
+ — deleted while Tasks was off is the one exception that catches up: within
361
+ fifteen minutes of Tasks being back on, the deleted project's tasks are deleted
362
+ and the deleted stage's tasks stay in their project with no stage, each
363
+ recorded in the audit log.
364
+
365
+ ## Permissions
366
+
367
+ | Code | What it allows |
368
+ | --- | --- |
369
+ | `tasks:read` | View tasks — the list, the board, *My tasks*, a single task, its comments, attachments and history — subject to each task's context, drafts and private tasks; comment on the tasks you see; keep saved views and your daily digest. |
370
+ | `tasks:write` | Create, change, assign, link, remind and delete tasks. Requires `tasks:read`. |
371
+ | `tasks:configure` | Configure the workflow, priorities, tags, board card and time zone. Requires `tasks:read`. |
372
+ | `tasks:see_private` | See other people's private tasks — read and delete only, never change, and never their drafts. Requires `tasks:read`. |
373
+
374
+ ## Upgrading from the first version
375
+
376
+ - **Statuses are now configurable.** The four statuses become the default
377
+ workflow, every move between them allowed, so everything behaves as before
378
+ until an operator changes it, and every task keeps its status. A project's
379
+ completion gate treats every finished and cancelled status as closed.
380
+ - **Existing assignees are kept**, as each task's first assignee. Every task
381
+ is published and has no priority, tag, start date or due time.
382
+ - **For integrations:** a task's `assignedAdminUserId` became `assigneeIds`
383
+ (`assignees` in the API's answers), a status is a code with its category,
384
+ `PATCH /api/v1/admin/tasks/:id` no longer takes `status` (use
385
+ `POST …/:id/status`), `DELETE …/:id` answers `200` with
386
+ `{ data: { subtasksDetached } }` instead of `204`, and the event
387
+ `tasks.task.assigned.v1` is replaced by `tasks.task.assignees_changed.v1`
388
+ (see *Events*).
389
+
390
+ ## For developers
391
+
392
+ ### The API
393
+
394
+ Every route is under `/api/v1/admin/tasks`; the request and response shapes are
395
+ the Zod schemas of `@endora-commerce/contracts` (`tasks.ts`). A task the caller
396
+ may not see — its context, a draft of somebody else's, a private task without
397
+ `tasks:see_private` — answers `404` `TASK_NOT_FOUND`, exactly like a task that
398
+ does not exist.
399
+
400
+ | Method and path | Permission | What it answers |
401
+ | --- | --- | --- |
402
+ | `GET /` | `tasks:read` | `{ items, nextCursor, prevCursor? }`. Filters: `status`, `statusCategory`, `assignee` (`me`, `none` or an id; any of), `creator` (`me` or an id), `priority` (codes or `none`), `tagId` (every one), `dueFrom`, `dueTo`, `overdue`, `linkedKind` with `linkedId`, `parentId`, `isSubtask`, `hasSubtasks`, `draft` (the caller's own), `private`, `customFieldFilters`, `q`; `sort` (`created`, `number`, `title`, `due`, `priority`, `status`, `updated`) and `dir`; `cursor`, `limit` (at most 100). An unknown status, priority or tag matches nothing. |
403
+ | `GET /mine` | `tasks:read` | `{ data }` — the caller's open, published tasks, by due moment, undated last (at most 500); the same filters. |
404
+ | `GET /board` | `tasks:read` | `{ data: { columns: [{ status, count, items, hasMore }] } }`, one column per status in workflow order; the list's filters and `perColumn` (at most 50, default 25). |
405
+ | `POST /` | `tasks:write` | `{ title, description?, assigneeIds?, dueOn? \| dueAt?, startOn?, priorityCode?, tagIds?, customFieldValues?, context?, parentTaskId?, links?, draft?, private? }` → `201` `{ data: TaskDetail }`. |
406
+ | `GET /:id` | `tasks:read` | `{ data: TaskDetail }` — with `references`, `links`, `subtaskItems`, `relatedTasks`, the caller's `reminders` and `permissions { canChange, canDelete, canPublish }`. |
407
+ | `PATCH /:id` | `tasks:write` | Any field of the create body but `draft`; `assigneeIds` replaces, `addAssigneeIds` / `removeAssigneeIds` adjust; `parentTaskId: null` detaches; `private` by the creator only. |
408
+ | `POST /:id/status` | `tasks:write` | `{ to, from }` → `{ data: { task, openSubtasks } }`; `409` `TASK_TRANSITION_FORBIDDEN` (`details.allowedTargets`), `409` `TASK_TRANSITION_CONFLICT` when the task left `from` meanwhile, `422` `TASK_STATUS_UNKNOWN`. |
409
+ | `POST /:id/publish` | `tasks:write` | The creator's draft becomes a task; `409` `TASK_ALREADY_PUBLISHED`. Somebody else's draft is `404`. |
410
+ | `DELETE /:id` | `tasks:write`, or `tasks:read` with `tasks:see_private` for a private task | `200` `{ data: { subtasksDetached } }` — the former sub-tasks the caller may see. |
411
+ | `GET /:id/history` | `tasks:read` | The task's audit trail, newest first (`RecordHistoryPage`). |
412
+ | `GET`, `POST /:id/comments`; `PATCH`, `DELETE /:id/comments/:commentId` | `tasks:read` | Comments, oldest first, references resolved; somebody else's comment is `403` `FORBIDDEN`. |
413
+ | `GET`, `POST /:id/attachments`; `POST /:id/attachments/upload`; `DELETE /:id/attachments/:attachmentId` | `tasks:read` to list, `tasks:write` to change | `{ assetId }` attaches a library file (with the library's read permission); `upload` takes a multipart file; `413` / `415` `TASK_ATTACHMENT_REFUSED`. |
414
+ | `PUT`, `DELETE /:id/relations/:otherId` | `tasks:write` on both | `204`, idempotent both ways. |
415
+ | `POST /:id/links`; `DELETE /:id/links/:linkId` | `tasks:write` | `{ kind, id }` → `201` a new link, `200` the existing one; `422` `TASK_LINK_INVALID`. |
416
+ | `GET`, `POST /:id/reminders`; `DELETE /:id/reminders/:reminderId` | `tasks:read` to list, `tasks:write` to add | `{ remindAt }` or `{ offsetMinutes }`, and `recipientIds`; `422` `TASK_REMINDER_INVALID`. Its creator, or a holder of `tasks:write`, removes one. |
417
+ | `GET /lookups/assignees`, `/lookups/mentionable`, `/lookups/documents`, `/lookups/records`, `/lookups/contexts` | `tasks:write` (`mentionable`: `tasks:read`) | The pickers: assignees, people to mention, the `@@` document list (groups `order`, `quote_request`, `task`, `opportunity`, `project`, each for its readers while its module is on), link targets, and projects with their stages. |
418
+ | `GET /custom-field-filters` | `tasks:read` | The task custom fields usable as list filters. |
419
+ | `GET /workflow`; `POST /statuses`; `PATCH`, `DELETE /statuses/:code`; `PUT /transitions` | `tasks:read` to read, `tasks:configure` to change | Every write answers the whole workflow; `422` `TASK_WORKFLOW_INVALID` (`details.rule`); removing a status in use needs `?replacement=`; `409` `TASK_STATUS_IN_USE_TOO_MANY` above 5,000 tasks. |
420
+ | `GET`, `POST /priorities`; `PATCH`, `DELETE /priorities/:code` | `tasks:read` to read, `tasks:configure` to change | As statuses; `replacement` may be `none`. |
421
+ | `GET`, `POST /tags`; `PATCH`, `DELETE /tags/:id` | `tasks:read` to read, `tasks:configure` to change | `409` `TASK_TAG_NAME_TAKEN`. |
422
+ | `GET`, `PUT /board/card-fields`; `GET`, `PUT /settings/time-zone` | `tasks:read` to read, `tasks:configure` to change | Written through the Settings module's own audited write. |
423
+ | `GET`, `POST /list-views`; `PATCH`, `DELETE /list-views/:id` | `tasks:read` | Saved views; `409` `TASK_VIEW_NAME_TAKEN`. |
424
+ | `GET`, `PUT`, `DELETE /me/digest` | `tasks:read` | The caller's digest: `{ hour }`, or `null` when it is off. |
425
+
426
+ Every write also refuses `403` `TASK_PRIVATE_READ_ONLY` to a holder of
427
+ `tasks:see_private` working on somebody else's private task, `422`
428
+ `TASK_PRIVATE_ASSIGNEE` for anybody but the creator on a private task, `422`
429
+ `TASK_PARENT_CYCLE` and `TASK_HIERARCHY_TOO_DEEP` for the hierarchy, and `422`
430
+ `TASK_PRIORITY_UNKNOWN` / `TASK_TAG_UNKNOWN` for a priority or a tag that does
431
+ not exist. The list/board choice is the admin preference `listViewModes`
432
+ (`tasks`, `tasks-mine`), served by the Admin users module.
433
+
434
+ A `context` written through the API must belong to a switched-on module that
435
+ lists the record as one you may see, and — when the record has groups, such as
436
+ a project's stages — name one of them; otherwise `422` `TASK_CONTEXT_INVALID`.
437
+ A task's `context` is read as `{ type, id, groupId, available, label, href,
438
+ groupLabel }`. When the owning module no longer describes the record,
439
+ `available` is `false`, `label` reads *Unavailable record* in your language and
440
+ `href` and `groupLabel` are `null`.
441
+
442
+ ### Task contexts
443
+
444
+ The Tasks module names no other module. A module that wants tasks of its own
445
+ registers a **Task context** — a context type it owns, such as `project` —
446
+ and from then on tasks can carry that type, the id of one of its records and,
447
+ optionally, the id of a group inside the record (a project's stage).
448
+
449
+ The registry is the container entry `taskContextRegistry`
450
+ (`TaskContextRegistryPort`). It is registered ungated, so push into it from a
451
+ **contribution-only boot hook with no presence probe**, and declare the edge in
452
+ your manifest's `nonBindingDependencies` as `contributes-to`:
453
+
454
+ ```ts
455
+ ctx.onBoot(() => {
456
+ lazyPort<TaskContextRegistryPort>(ctx, 'taskContextRegistry').register({
457
+ contextType: 'project',
458
+ ownerModuleId: 'projects',
459
+ allVisibleContextIds: () => /* every record id the caller may see */,
460
+ visibleContextIds: (ids) => /* which of these ids the caller may see */,
461
+ describe: (ids) => /* id → { label, href, groups: groupId → label } */,
462
+ canSeeAs: (adminUserId, id) => /* may that administrator see this record? */,
463
+ canChangeTasks: (id) => /* may the caller add, take out or delete a task of this record? */,
464
+ existingContexts: (ids) => /* id → the group ids it has now, for each id that still exists */,
465
+ });
466
+ });
467
+ ```
468
+
469
+ The contract a descriptor keeps:
470
+
471
+ - **Every method but `existingContexts` runs under the caller's own tenant
472
+ context.** Answer for the caller, exactly as your own screens would.
473
+ - `allVisibleContextIds()` is the list pre-filter: the Tasks list and board ask
474
+ it once per request and narrow their query to those ids, so pages stay
475
+ exact. Keep it cheap.
476
+ - `visibleContextIds(ids)` answers for a single task, or a few.
477
+ - `describe(ids)` is how a task shows its context: a label, an address in the
478
+ Admin UI, and the labels of the record's groups.
479
+ - `canSeeAs(adminUserId, id)` is the one method that answers for **somebody
480
+ else**: whether that administrator, by their own permissions and reach, may
481
+ see the record. It is asked before anybody is told about a task of the
482
+ record — an assignee, a mention, a comment, a reminder, the digest; `false` —
483
+ or an owner that is switched off — means nobody is told.
484
+ - `canChangeTasks(id)` decides whether the caller may change which tasks the
485
+ record holds: put a task **into** it (create it there, or move it there), take
486
+ one **out of** it (detach it with `context: null`, or move it to another
487
+ record) or **delete** one of its tasks. Moving a task between the record's own
488
+ groups, and editing a task where it is, are not asked. Projects answers yes to
489
+ a holder of `projects:write` who sees the project; `false` refuses putting in
490
+ and taking out with `422` `TASK_CONTEXT_INVALID`, and deleting with `403`
491
+ `FORBIDDEN`.
492
+ - `renderNote(note, language)`, optional, words the note your module left on a
493
+ task when it created it (`contextNote` of `taskWritePort.createMany`) in the
494
+ reader's language. Store a key rather than a sentence — Projects stores the
495
+ responsible role — and answer the sentence here; without it the note is shown
496
+ as stored.
497
+ - `existingContexts(ids)`, optional, answers **which of these records still
498
+ exist, and the group ids each has now** — a map from each existing id to its
499
+ set of group ids. It is asked **only under the system actor**, by the
500
+ maintenance pass below, and must answer regardless of who may see the
501
+ records. **An id missing from the answer deletes that record's tasks**, so an
502
+ id your module cannot vouch for — one it cannot read, or does not recognise —
503
+ must be answered as existing. A group missing from an existing record's set
504
+ takes the record's tasks out of that group. A module without the method is
505
+ never cleaned up.
506
+ - One context type has one owner; registering a second, different descriptor
507
+ for a type already taken stops the backend at boot.
508
+ - **The policy is fail-closed.** A task whose context type nobody registered,
509
+ or whose owner is switched off, is hidden from lists, boards, counts and by
510
+ id, and reappears when the owner is back. The system — a background job with
511
+ no administrator behind it — is never narrowed.
512
+
513
+ **The maintenance pass.** A context owner deletes the tasks of a record it
514
+ deletes through `taskWritePort.deleteInContext` — but only while Tasks is on.
515
+ What was deleted while Tasks was off is found by the third pass of the
516
+ `tasks-reminders` worker, which runs at most every **fifteen minutes**: for each
517
+ **present** owner that implements `existingContexts`, it reads the distinct
518
+ contexts its tasks name, 500 at a time, and asks the owner about them. Each
519
+ task of a gone record is deleted through the module's delete command
520
+ (`deleteTaskCommand(id, auditLog, { reason, onlyIn })` — re-read under a lock,
521
+ left alone if it moved meanwhile, its sub-tasks detached) with the audit row's
522
+ reason `context_gone`; each task of an existing record whose group is gone loses
523
+ its group, a `tasks.task.update` audit row with the reason
524
+ `context_group_gone`. One command per task, each with its own audit row. An
525
+ owner that is switched off is not asked, so nothing of it is taken for gone; a
526
+ pass with nothing to do enters no system scope.
527
+
528
+ ### Reading and writing tasks from another module
529
+
530
+ Two ports, both gated — resolving either while Tasks is off throws, and the
531
+ call answers `503` `MODULE_DISABLED`. Resolve them with `lazyPort` and declare
532
+ them `degrades-without` with a `whenAbsent` sentence.
533
+
534
+ | Port | Methods |
535
+ | --- | --- |
536
+ | `taskReadPort` (`TaskReadPort`) | `findById`, `findByIds`, `search` (number or title), `listInContext`, `listOpenInContext` (open category and not a draft — a completion gate's question), `countInContext`. A `TaskRecord` carries `status` (a code), `statusCategory`, `closed`, `assigneeIds`, `dueAt`, `draft` and `private`. Narrowed by the full visibility rule for an administrator — context, drafts, private tasks — not for the system. |
537
+ | `taskWritePort` (`TaskWritePort`) | `createMany({ context, tasks })` — at most 100 tasks, each `{ title, description?, assigneeIds?, dueOn?, contextGroupId?, contextNote?, sourceKey? }`, published, in the workflow's start status; one audited `tasks.task.create` command and one `tasks.task.created.v1` event per task created; refused with `TASK_CONTEXT_INVALID` when no switched-on module owns the context type and with `TASK_ASSIGNEE_INVALID` when an assignee is not an active administrator, before anything is written. Whether an assignee may see the record is the owning module's to decide — a project assigns each stage task to the member holding its role — so the port does not ask it, as the Tasks screens and API do. `deleteInContext({ contextType, contextId })` — every task of one record, one audited `tasks.task.delete` command each. |
538
+
539
+ **`sourceKey` makes creation idempotent.** A task given a `sourceKey` (up to 100
540
+ characters) is created only if the context holds no task with that key; the
541
+ answer's `ids` are in input order, an existing task's id standing where it was
542
+ asked for. A key repeated in one call is created once, and two calls at once
543
+ with the same keys create each task once — the database's unique key decides,
544
+ and the loser answers the winner's id. Projects passes each stage task
545
+ definition's id, which is what makes its *Create the stage's tasks again*
546
+ safe to repeat.
547
+
548
+ Call `createMany` **after your own transaction has committed**: each task is
549
+ written in a transaction of its own.
550
+
551
+ `./backend` also exports **`nextTaskNumber(em)`**, the module's door to its
552
+ number sequence — the next `TSK-…` number on the caller's transaction, for code
553
+ that writes tasks without a Command, such as the demo composition; one format
554
+ and one sequence, whoever creates the task.
555
+
556
+ ### Notifications, reminders and the digest
557
+
558
+ Bell entries go through `adminNotificationRecordPort` (a `degrades-without`
559
+ edge), with subject `task`, after the write has committed: `tasks.task.assigned`,
560
+ `tasks.task.mention`, `tasks.task.comment`, `tasks.task.reminder` and
561
+ `tasks.digest.daily`. Every recipient is asked first whether they may see the
562
+ task — `tasks:read`, drafts and private tasks, and the context's `canSeeAs`.
563
+
564
+ A reminder's bell entry is written with **`recordWithin(em, input)`**, the
565
+ port's co-transactional method: in the same transaction as the reminder's
566
+ delivery row, which is unique per reminder and recipient. So the bell entry is
567
+ written **exactly once**, even when two workers run the pass at once, and the
568
+ e-mail — sent after the commit, as the transactional e-mail
569
+ `tasks_task_reminder` — **at most once**: a crash between the commit and the
570
+ send loses the e-mail and keeps the bell entry. A reminder more than 24 hours
571
+ late is recorded as `expired`, one for a recipient who may no longer be told as
572
+ `skipped`, and neither sends anything. The digest claims each subscriber's day
573
+ before it sends (`tasks_daily_digest`), so it is sent at most once a day.
574
+
575
+ All three passes — reminders every minute, the digest and the maintenance pass
576
+ at most every fifteen minutes — run in the one BullMQ Job Scheduler
577
+ `tasks-reminders`, attached through `ctx.worker` only in a process that runs
578
+ workers. A tick decides the module's presence first, then asks each pass's
579
+ one-bit probe outside any tenant scope, and enters a system scope only for a
580
+ pass with work; a tick with nothing to do writes no `tenant.escape_hatch`
581
+ audit row.
582
+
583
+ ### Events
584
+
585
+ | Event | Payload |
586
+ | --- | --- |
587
+ | `tasks.task.created.v1` | `{ taskId, contextType, contextId, contextGroupId, assigneeIds }` |
588
+ | `tasks.task.status_changed.v1` | `{ taskId, from, to, toCategory, contextType, contextId, contextGroupId }` — `from` and `to` are status codes. |
589
+ | `tasks.task.assignees_changed.v1` | `{ taskId, added, removed }` — **replaces** `tasks.task.assigned.v1` |
590
+ | `tasks.task.deleted.v1` | `{ taskId, contextType, contextId }` |
591
+
592
+ Each is emitted once per command, after it commits. A change of several kinds
593
+ at once — a `PATCH` with a new title and new assignees — is one command per
594
+ kind, each with its own audit row. **A draft emits no event** until it is
595
+ published: `tasks.task.created.v1` is emitted at publication, with the
596
+ assignees the task has then. Removing a status or a priority moves its tasks
597
+ with one audit row each and no event.