[TASKMGMT-57] 'requestor' of his Tasks should be able to see his own tasks and their states Created: 13/Apr/22 Updated: 13/Apr/22 |
|
| Status: | Open |
| Project: | Task Management |
| Component/s: | None |
| Affects Version/s: | 1.2.9 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Christian Ringele | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | task-view, tasks | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Template: |
|
| Patch included: |
Yes
|
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Description |
|
I discussed this improvement with slutz Situation / ProblemA content editor/Eric published content, in pages app trough workflow/tasks. When he triggers a publication, he does not get any information at all.
Solution - GeneralOne should always see his own requested/triggered Tasks. The one sees the state of every task -> 'requestor' in Task Of course he can not assign or change the task, as he is not a part of the task's group it was sent to. Only seeing it, not being able to operate on it. Solution - In CodeI dug a bit into the code. I think the solution is pretty easy, maybe I missed some place where also needs adaptions. info.magnolia.task.persistence.TasksStoreImpl.prepareQueryStatementByUserAndStatuses(String, List<Status>) Code change from: StringBuilder sql = new StringBuilder(String.format("SELECT * FROM [%1$s] WHERE (actorId = '%2$s' OR actorIds = '%2$s'", TaskNode.NAME, userId)); To: StringBuilder sql = new StringBuilder(String.format("SELECT * FROM [%1$s] WHERE ((actorId = '%2$s' OR actorIds = '%2$s') OR (requestor = '%2$s')", TaskNode.NAME, userId));
Which will change the resulting query: From resulting query in info.magnolia.task.persistence.TasksStoreImpl.prepareQueryStatementByUserAndStatuses(String, List<Status>): SELECT * FROM [mgnl:task] WHERE (actorId = 'eric' OR actorIds = 'eric' OR groupIds = 'travel-demo-editors') AND (status LIKE '%Created%') AND status NOT LIKE '%Archived%' To resulting query in info.magnolia.task.persistence.TasksStoreImpl.prepareQueryStatementByUserAndStatuses(String, List<Status>): SELECT * FROM [mgnl:task] WHERE ((actorId = 'eric' OR actorIds = 'eric' OR groupIds = 'travel-demo-editors') OR (requestor = 'eric')) AND (status LIKE '%Created%') AND status NOT LIKE '%Archived%' Possible nice extensionsExtension 1 - Allow sending a message/notification
Extension 2 - Be informed on successWhen a task finishes successful, that the requestor gets automatically informed about it by the workflow/task. |