Bug 207524 - add create subtask action for Bugzilla editor
Summary: add create subtask action for Bugzilla editor
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: 2.2   Edit
Assignee: Frank Becker CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks: 169426
  Show dependency tree
 
Reported: 2007-10-25 20:40 EDT by Steffen Pingel CLA
Modified: 2007-11-21 03:53 EST (History)
3 users (show)

See Also:


Attachments
patch (8.56 KB, patch)
2007-11-20 14:21 EST, Frank Becker CLA
no flags Details | Diff
mylyn/context/zip (2.62 KB, application/octet-stream)
2007-11-20 14:21 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 Steffen Pingel CLA 2007-10-25 20:40:09 EDT
It would be great if the Bugzilla editor had an action to create subtasks similar to the JIRA editor. The created bug would have the "Depends On" attribute preset to the parent task and could also inherit other attribute values.
Comment 1 maarten meijer CLA 2007-11-01 18:16:00 EDT
Maybe just add this to the CloneTaskAction (now it only sets a comment with back link url) or in a more extensive implementation in the bugzilla task, 
See latest patch in bug 161646: [patch] Support for Clone this bug. It contains a stub in NewBugzillaTaskEditor to handle setting more fields, if it recognizes them.
Comment 2 Shawn Minto CLA 2007-11-14 18:44:45 EST
Is there any way that we could make this something that is extensible?  I see that Jira already contributes this type of action and it would be nice to have api for it so that developers do not have to copy this action for each connector.
Comment 3 Mik Kersten CLA 2007-11-14 23:24:06 EST
Yes, I would definitely like this to be a common action.  The driver for generalizing it can be Bugzilla, which to start could just copy the right components.  

Shawn: if this doesn't make it high enough Steffen's priority list consider submitting a patch.
Comment 4 Frank Becker CLA 2007-11-18 14:45:29 EST
 (In reply to comment #0)
> It would be great if the Bugzilla editor had an action to create subtasks
> similar to the JIRA editor. The created bug would have the "Depends On"
> attribute preset to the parent task and could also inherit other attribute
> values.

Stefen,

should I  look at this?

If so, what other attributes did you have in mind?
Comment 5 Steffen Pingel CLA 2007-11-19 14:05:53 EST
Sounds great, Frank. Take a look at JiraTaskDataHandler.initializeSubTaskData() and the corresponding action in JIRA. For Bugzilla this should work the same way, a single click action to open the editor for creating a sub-task. The Blocks attribute should be set to the parent task, not the Depends On attribute as the descriptions suggests.

You can use the AbstractTaskDataHandler.cloneTaskData() method for copying other attributes. I haven't done that for JIRA, yet, but it should be straight forward.
Comment 6 Frank Becker CLA 2007-11-19 17:53:16 EST
 (In reply to comment #5)
> Sounds great, Frank. Take a look at JiraTaskDataHandler.initializeSubTaskData()
> and the corresponding action in JIRA. For Bugzilla this should work the same
> way, a single click action to open the editor for creating a sub-task. The
> Blocks attribute should be set to the parent task, not the Depends On attribute
> as the descriptions suggests.

I looked at this and have a Question.

Should I move NewSubTaskAction from org.eclipse.mylyn.internal.jira.ui.actions to org.eclipse.mylyn.internal.task.ui.actions or should I create an Bugzilla specific Action.

> 
> You can use the AbstractTaskDataHandler.cloneTaskData() method for copying other
> attributes. I haven't done that for JIRA, yet, but it should be straight
> forward.

My implementation use AbstractTaskDataHandler.cloneTaskData so Summery and Description get set from the parent. Is this OK.

When I get the answer I will post soon an Patch.

Comment 7 Steffen Pingel CLA 2007-11-19 18:02:52 EST
(In reply to comment #6)
> Should I move NewSubTaskAction from org.eclipse.mylyn.internal.jira.ui.actions
> to org.eclipse.mylyn.internal.task.ui.actions or should I create an Bugzilla
> specific Action.

It is okay to duplicate the action code for now. We can generalize later on.

> My implementation use AbstractTaskDataHandler.cloneTaskData so Summery and
> Description get set from the parent. Is this OK.

It seems that this does make much sense for a subtasks as it will a specific summary and description to that task. How about reseting these to empty strings after cloning?
Comment 8 Frank Becker CLA 2007-11-20 14:21:01 EST
Created attachment 83352 [details]
patch

Please copy file

org.eclipse.mylyn.jira.ui/icons/etool16/sub-task-new.gif

to

org.eclipse.mylyn.bugzilla.ui/icons/etool16/sub-task-new.gif

to get this patch work.
Comment 9 Frank Becker CLA 2007-11-20 14:21:03 EST
Created attachment 83353 [details]
mylyn/context/zip
Comment 10 Steffen Pingel CLA 2007-11-20 15:34:09 EST
Thanks Frank! Patch looks great to me. The only minor thing that should be changed is the label for the action, it should be "Subtask". Rob, assigning to you for reviews, since the patch touches Bugzilla code.
Comment 11 Robert Elves CLA 2007-11-21 03:52:43 EST
Awesome Frank.  Patch applied and ip log updated. Updated action label to 'Subtask' as Steffen suggested and added your name to the Javadoc of NewBugzillaSubTaskAction (convention whenever adding a new class to the code base).  
Comment 12 Robert Elves CLA 2007-11-21 03:53:21 EST
Marking resolved.