Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338013 - mark as read on incoming folder ignores working sets
Summary: mark as read on incoming folder ignores working sets
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: 3.8   Edit
Assignee: Sam Davis CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-23 14:25 EST by Sam Davis CLA
Modified: 2012-06-04 18:44 EDT (History)
1 user (show)

See Also:


Attachments
patch (1.72 KB, patch)
2012-01-04 18:46 EST, Sam Davis CLA
no flags Details | Diff
mylyn/context/zip (3.63 KB, application/octet-stream)
2012-01-04 18:46 EST, Sam Davis CLA
no flags Details
patch with flag (4.85 KB, patch)
2012-01-09 16:18 EST, Sam Davis CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Davis CLA 2011-02-23 14:25:04 EST
When I mark the incoming folder read, I expect it to mark only those tasks that are in the current working set, but it marks all incoming tasks in all working sets read. Now I have no idea what incomings I've missed.
Comment 1 Steffen Pingel CLA 2011-07-21 18:50:05 EDT
Aggreed, the behavior is unexpected with a major impact. Let's try to get this fixed for 3.6.1.
Comment 2 Sam Davis CLA 2012-01-04 18:46:14 EST
Created attachment 209041 [details]
patch

Steffen, let me know if you think of any edge cases where this would behave strangely; it seems to me like the right thing to do and it works.
Comment 3 Sam Davis CLA 2012-01-04 18:46:17 EST
Created attachment 209042 [details]
mylyn/context/zip
Comment 4 Steffen Pingel CLA 2012-01-05 19:33:34 EST
The filtering needs be controlled by sub-classes since AbstractTaskHandler is used for all kinds of commands some of which are independent of the task list and working set (e.g. when executed from the task editor). While the code is very compact I'm not a big fan of labels. To keep the code consistent with other parts of Mylyn I would prefer if the nested loop was extracted to a method.
Comment 5 Sam Davis CLA 2012-01-06 14:54:28 EST
The filtering only happens when selecting an ITaskContainer that isn't an ITask. How could a user select one outside of the task list?
Comment 6 Steffen Pingel CLA 2012-01-09 10:58:03 EST
(In reply to comment #5)
> The filtering only happens when selecting an ITaskContainer that isn't an ITask.
> How could a user select one outside of the task list?

Good point, but it's still not intuitive to sub-class implementors that this type of filtering would be happening in the parent class. There should at least be a boolean flag to toggle the behavior, e.g. filterBasedOnActiveTaskList.
Comment 7 Sam Davis CLA 2012-01-09 16:18:33 EST
Created attachment 209229 [details]
patch with flag
Comment 8 Steffen Pingel CLA 2012-01-11 08:37:27 EST
Thanks for the update. Can you change the boolean flag in the constructor to using a set/getter? That makes it more obvious what the flag means. If you add a test case I'll be happy to apply the patch.
Comment 9 Steffen Pingel CLA 2012-05-23 06:41:33 EDT
Sam, are you planning to resolve this for 3.8?
Comment 10 Sam Davis CLA 2012-05-23 13:49:34 EDT
I am scheduling this for Monday. It will depend on the feasibility of adding a test case.
Comment 11 Sam Davis CLA 2012-05-29 16:51:22 EDT
Steffen, I've pushed a review with the requested change and a test case.
Comment 12 Steffen Pingel CLA 2012-06-04 18:44:26 EDT
Great! Thanks. I have submitted the review: https://git.eclipse.org/r/#change,6163.