Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 246923 - The BugzillaTaskDataHandler versionNumber not set when reading the repository
Summary: The BugzillaTaskDataHandler versionNumber not set when reading the repository
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: dev   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.1   Edit
Assignee: Robert Elves CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-10 17:48 EDT by Frank Becker CLA
Modified: 2008-11-12 23:38 EST (History)
1 user (show)

See Also:


Attachments
mylyn/context/zip (1.53 KB, application/octet-stream)
2008-09-10 17:50 EDT, Frank Becker CLA
no flags Details
patch (1.94 KB, patch)
2008-09-10 17:55 EDT, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (1.53 KB, application/octet-stream)
2008-09-10 17:55 EDT, Frank Becker CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Becker CLA 2008-09-10 17:48:45 EDT
BugzillaClient getTaskData did not set the Version. This results in call of the migrate for every version all the time we read the repository
Comment 1 Frank Becker CLA 2008-09-10 17:50:58 EDT
Created attachment 112262 [details]
mylyn/context/zip
Comment 2 Frank Becker CLA 2008-09-10 17:55:24 EDT
Created attachment 112263 [details]
patch

possible fix!
Comment 3 Frank Becker CLA 2008-09-10 17:55:26 EDT
Created attachment 112264 [details]
mylyn/context/zip
Comment 4 Steffen Pingel CLA 2008-09-10 18:05:31 EDT
Great catch Frank. The version is being set in BugzillaTaskDataHandler.initializeTaskData(). Rob, why are not all task data objects initialized through this method?
Comment 5 Robert Elves CLA 2008-09-21 13:27:49 EDT
(In reply to comment #4)
> Great catch Frank. The version is being set in
> BugzillaTaskDataHandler.initializeTaskData(). Rob, why are not all task data
> objects initialized through this method?
I believe because the product isn't known so many of the attributes are not known. If this is the case the method should be renamed to something link initializeNewTaskData() but it doesn't appear to be in use which is a concern.

yes, great catch Frank.  I've applied your patch (and update ip log) but will need to look into this further.
Comment 6 Steffen Pingel CLA 2008-09-21 15:08:43 EDT
The JIRA code has essentially the same structure. You can look at JiraTaskDataHandler for an example. Please extract the common parts of the initialization code into a method and set the task data version in a _single_ place.
Comment 7 Robert Elves CLA 2008-09-24 13:35:48 EDT
Version now set in single location but some ugliness remains in BugzillaTaskDataHandler.getMultiTaskData().  Somewhat related is the oddity of where TaskData is being created in the BugzillaClient as well.  More work to be done here.
Comment 8 Robert Elves CLA 2008-11-12 23:38:36 EST
(In reply to comment #7)
> Version now set in single location but some ugliness remains in
> BugzillaTaskDataHandler.getMultiTaskData().  Somewhat related is the oddity of
> where TaskData is being created in the BugzillaClient as well.  More work to be
> done here.
created bug#255132 to address this.