Uploaded image for project: 'Task Management'
  1. Task Management
  2. TASKMGMT-55

Users are notified on tasks not belonging to them

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Neutral
    • 1.2.10, 2.0.0
    • 1.2.8, 1.2.9
    • None

    Description

      Steps to reproduce

      1. Login to superuser and publish a page, set the publication date in the future (maybe tomorrow) to trigger scheduled pending publication
      2.  Still in the session, open the task, click on "assign to me", then "approve and publish"
      3. This will create a scheduled task and wait for its publication. Left it there and switch to editor account
      4. Login to editor account such as demo "eric" one to see the issue

      Expected results

      • Because the scheduled to be published task has no relation to "eric" editor, he should see no tasks in his pending list as well as total task count

      Actual results

      • There is +1 task in the total task count, see below illustration image:

      Workaround

      • No

      Development notes

      • Investigation shown that the query in info.magnolia.task.persistence.TasksStoreImpl.findTasksByAssigneeAndStatus(String, List<Status>) is not correct.
      • Let's take "eric" editor as an example, we have below query:
        SELECT * FROM [mgnl:task] WHERE (actorId = 'eric' OR actorIds = 'eric') 
        AND status LIKE '%InProgress%' OR status LIKE '%Scheduled%'
        
      • The query list out "Scheduled" tasks that not belong to the editor
      • The fix could be:
        SELECT * FROM [mgnl:task] WHERE (actorId = 'eric' OR actorIds = 'eric') 
        AND (status LIKE '%InProgress%' OR status LIKE '%Scheduled%')
        

      Discovery

      • The issue is reproduce-able (check the screen recording in attachment)  and the proposed solution above seems legit too.

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                nguyen.phung Nguyen Phung Chi
                viet.nguyen Viet Nguyen
                AdminX
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Remaining Estimate - Not Specified
                      Not Specified
                      Logged:
                      Time Spent - 1d 5h
                      1d 5h