Bug 206840 - "Context / Copy to..." action should allow to create new task
Summary: "Context / Copy to..." action should allow to create new task
Status: CLOSED MOVED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P4 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2007-10-18 20:48 EDT by Eugene Kuleshov CLA
Modified: 2010-07-16 17:16 EDT (History)
2 users (show)

See Also:


Attachments
mylyn/context/zip (1.31 KB, application/octet-stream)
2007-11-20 18:57 EST, Eugene Kuleshov CLA
no flags Details
patch (13.40 KB, patch)
2007-11-22 16:49 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (7.16 KB, application/octet-stream)
2007-11-22 16:49 EST, Frank Becker CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Kuleshov CLA 2007-10-18 20:48:08 EDT
"Context / Copy to..." action should allow to create new task right from the dialog used to select task.
Comment 1 Mik Kersten CLA 2007-10-18 22:34:53 EDT
Makes sense to me.  Seems like a "New Task..." button at the bottom of the dialog would suffice.
Comment 2 Frank Becker CLA 2007-11-19 00:02:37 EST
 (In reply to comment #1)
> Makes sense to me.  Seems like a "New Task..." button at the bottom of the
> dialog would suffice.

I start with this but if I create the new Button and run the NewTaskAction from widgetSelected i got the following problem.

After the "Net Task"  Dialog finished the newly created TaskEditor is behind the opend Dialog. So it is not possible to fill the neede Fileds and save the new Task.

How should we make up the UI so that the new Task is enterd before we come back to the TaskSelectionDialog.
Comment 3 Eugene Kuleshov CLA 2007-11-19 00:07:50 EST
Frank, it would make sense close "Open Dialog" when "new task" action is invoked and pass context to the new task editor. So, when context is passed, context for the new task can be populated upon editor completion and no new UI will be needed.
Comment 4 Frank Becker CLA 2007-11-20 16:35:20 EST
 (In reply to comment #3)
> Frank, it would make sense close "Open Dialog" when "new task" action is invoked
> and pass context to the new task editor. So, when context is passed, context for
> the new task can be populated upon editor completion and no new UI will be
> needed.

OK I can do this but if I see it right the problem is that the new API (TaskSelection) can used to save the context until the TaskEditor is opened.

But for save the Context I need the ID of the new Task. This is set with the save button.

How to solve this problem.
Comment 5 Eugene Kuleshov CLA 2007-11-20 18:57:25 EST
Frank, I think AbstractRepositoryTaskEditor.submitToRepository() can be updated to call something like the following after submission job is completed:

  ContextCorePlugin.getContextManager().cloneContext(
     sourceTask.getHandleIdentifier(), 
     targetTask.getHandleIdentifier());

you'll need to save the source task (probably in the editor instance) when new task editor is created.
Comment 6 Eugene Kuleshov CLA 2007-11-20 18:57:27 EST
Created attachment 83374 [details]
mylyn/context/zip
Comment 7 Frank Becker CLA 2007-11-22 16:49:12 EST
Created attachment 83586 [details]
patch

To get this work I put a new field in TaskSelection and NewTaskEditorInput to pass the Information from the Action to the Editor.
Comment 8 Frank Becker CLA 2007-11-22 16:49:15 EST
Created attachment 83587 [details]
mylyn/context/zip
Comment 9 Mik Kersten CLA 2007-11-27 12:07:31 EST
Rob: please queue for review.
Comment 10 Steffen Pingel CLA 2007-11-27 17:07:52 EST
Frank, can you explain why the context is cloned in the task editor and not in NewBugzillaTaskWizard?
Comment 11 Frank Becker CLA 2007-11-28 02:31:22 EST
 (In reply to comment #10)
> Frank, can you explain why the context is cloned in the task editor and not in
> NewBugzillaTaskWizard?
Steffen,

currently im at work, so I did not have the code in front of my, but if I remember it right the problem was.

In NewBugzillaTaskWizard you get an new task but the ID is not set correctly. The Id get set during the action behind the submit button in task editor.

I will verify this at home.
Comment 12 Steffen Pingel CLA 2007-11-28 15:56:32 EST
Yes, that definitely makes it more difficult to implement this feature and passing the context in the editor input might indeed be the best way to do it. 

The underlying problem is that the actual task is created with a different id when it is submitted to the repository. For 3.0 the framework should support storing contexts for unsubmitted tasks and migrate the context when the actual task is created (related to bug 152272). 
Comment 13 Robert Elves CLA 2008-06-14 01:13:31 EDT
Need to defer: http://wiki.eclipse.org/index.php/Mylyn/3.0_Plan#Deferred_Items
Comment 14 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