[TASKMGMT-53] Bulk Actions for Tasks Cause StackOverflow Errors Created: 25/Jan/21 Updated: 23/Jul/21 Resolved: 27/May/21 |
|
| Status: | Closed |
| Project: | Task Management |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Julian Nodarse | Assignee: | Unassigned |
| Resolution: | Workaround exists | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Template: |
|
||||
| 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)
|
||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||
| Description |
|
Reproduce
Expected Actual Workaround import info.magnolia.jcr.util.NodeUtil import info.magnolia.task.Task import java.text.SimpleDateFormat archived= 0 taskManager = info.magnolia.objectfactory.Components.getComponent(info.magnolia.task.TasksManager.class); session = ctx.getJCRSession("tasks") qm = session.getWorkspace().getQueryManager() query="select * from [mgnl:task] where status = '"+Task.Status.class.getName()+":Resolved'" q = qm.createQuery(query, "JCR-SQL2") results = q.execute() tasks = NodeUtil.asList(NodeUtil.asIterable(results.getNodes())) for (task in tasks) { ++archived String id = task.getId() taskManager.archiveTask(id); } println("archived "+archived+" tasks") Notes
|