Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 187450 - [api] False incoming upon task synchronization if reverting to older offline task data
Summary: [api] False incoming upon task synchronization if reverting to older offline ...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P4 normal (vote)
Target Milestone: 3.0   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-17 00:08 EDT by Robert Elves CLA
Modified: 2008-04-26 00:52 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Elves CLA 2007-05-17 00:08:56 EDT
If the offline file is replace with an version that has the data for a particular bug but is old (and user has read before), upon opening in the editor the subsequent sync will result in new incoming changes (although they've been read before).  The reason for this is that upon loading and displaying the old task in the editor, the editor calls RepositorySynchronizationManager.setTaskRead() which set the last read date to the timestamp on the (old) task data. The fix is to do do an actual date comparison so ensure that setTaskRead() doesn't set the date if the date held in the AbstractRepositoryTask is more recent than the date offered by the task data. This will result in the 'new' incoming changes highlighted upon opening but will not cause incoming status on the task.

Rather than hard code date comparison of this field we should likely get a comparator from the respective connector or add a method...
Comment 1 Robert Elves CLA 2007-06-25 16:07:24 EDT
Since this is an edge case and it is getting late in the 2.0 game, I'm deferring to 3.0.
Comment 2 Steffen Pingel CLA 2008-04-26 00:52:57 EDT
New API has been added to AbstractRepositoryConnector for determining if task data that is received from the repository has changes:

	public boolean hasChanged(AbstractTask task, TaskData taskData);

Connector may now implement a policy that is based on comparing dates (e.g. JIRA uses the last modification date) rather than strings.