Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337251 - AbstractTaskDataHandler.postTaskData receives old attributes for unsubmitted tasks
Summary: AbstractTaskDataHandler.postTaskData receives old attributes for unsubmitted ...
Status: CLOSED MOVED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-15 15:55 EST by Robert Munteanu CLA
Modified: 2011-05-21 14:28 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Munteanu CLA 2011-02-15 15:55:09 EST
In the Mantis connector, I create a sub-task and initialize the sub-task data from the parent task. When submitting, I perform some calculations based on the changed attributes to detect added/removed task relationships, as the MantisBT SOAP API requires that I add/remove them individually.

Only for sub-tasks I receive a task that is new, but has a non-empty set of changed attributes. The changed attributes are those which have been altered in the task editor after initializing the subtask data. I would expect that if the task is new there would be no change attributes.
Comment 1 Robert Munteanu CLA 2011-02-16 11:06:14 EST
I managed to reproduce this for new tasks as well, so I'm adjusting the title.
Comment 2 Steffen Pingel CLA 2011-02-21 22:50:30 EST
Does the list of attributes match the attributes modified in the task editor? While I follow your argument that an empty list of changed attributes makes the most sense in the case of new tasks I wonder if it's worth the risk changing this now as connectors may rely on the current behavior. Does it work for you to simply check if the task data isNew()?
Comment 3 Robert Munteanu CLA 2011-02-22 07:08:55 EST
(In reply to comment #2)
> Does the list of attributes match the attributes modified in the task editor?

Yes.

> While I follow your argument that an empty list of changed attributes makes the
> most sense in the case of new tasks I wonder if it's worth the risk changing
> this now as connectors may rely on the current behavior.

Hm, yes, that's always a problem.

>  Does it work for you to
> simply check if the task data isNew()?

Yes, it does. I don't need this bug resolved for the change detection logic to work, but it threw me off a bit. Perhaps a brief javadoc would clear this confusion?
Comment 4 Steffen Pingel CLA 2011-05-21 14:28:59 EDT
Unfortunately we didn't get around to this. Removing milestone for now but we'll consider it when planning the next release cycle.
Comment 5 Eclipse Webmaster CLA 2022-11-15 11:45:08 EST
Mylyn has been restructured, and our issue tracking has moved to GitHub [1].

We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub.

[1] https://github.com/orgs/eclipse-mylyn