Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [mylyn-integrators] Implementing subtasks in a repositoryconnector

Thanks Steffen,

that did the trick. For others who try to get subtasks working:

Start with a copy from the TracRepository connector:

    @Override public Collection<TaskRelation> getTaskRelations(TaskData taskData)
    {
        TaskAttribute attribute = taskData.getRoot().getAttribute(PLACE_YOUR_ATTRIBUTE_HERE);
        if (attribute != null)
        {
            List<TaskRelation> result = new ArrayList<TaskRelation>();
            StringTokenizer t = new StringTokenizer(attribute.getValue(), ", ");
                
            while (t.hasMoreTokens())
            {
               result.add(TaskRelation.subtask(t.nextToken()));
            }
            return result;
        }
        
        return Collections.emptySet();
       ...
    }

(my version had to ensure only CRs are scanned for subtasks).

From the parent tasks perspective list the IDs of the subtasks. The Trac
Connector simply holds them as comma separated strings in a task attribute.
That is simple enough to adapt to your needs.

In your own TaskDataHandler (somewhere below getTaskData()) be sure to fill
the TaskAttribute mentioned in the code above with the IDs of the subtasks
and -- voilĂ .


The tipp where to look at saved me a lot of searching. Hope this info
helps others too.

Regards,
Sebastian




> Steffen Pingel
> Sent: Thursday, November 20, 2008 2:21 PM
> 
> Take a look at TracRepositoryConnector.getTaskRelations(). 
> The returned list of subtask relations is used 
> SynchronizeTasksJobs to build the hierarchy in the task list.
> 
> Steffen
> 
> 
> On Fri, Nov 14, 2008 at 12:11 AM,  
> <Sebastian.Baer@xxxxxxxxxxx> wrote:
> > Hi,
> >
> > since the developers at our company are very fond of Mylyn, 
> they asked me to write a connector for our configuration 
> management system. I have the read-only features nearly finished.
> >
> > Our system has change requests and below those there are 
> tasks that the developers can write to have a more detailed 
> view on what needs to be done for the change request.
> >
> > It looks like this:
> >
> >  CR#4711 Implement token login
> >   |
> >   +-- Task#13447 Web-GUI
> >   |
> >   +-- Task#14558 Web-GUI Test
> >   |
> >   +-- Task#14788 Business Locik
> >   |
> >   +-- Task#14820 Business Logic Test
> >   |
> >   `-- Task#15001 Document in user guide
> >
> > As you can see the text in the Tasks is not usable without 
> knowing the requirement in the change request.
> >
> > I would like to use Mylyn subtasks in the connector to 
> mimic this structure. The change request should be the parent 
> Task in Mylyn and the CR tasks should be subtasks.
> >
> > As suggested in the integrators guide I used the 
> Trac-Connector to learn how to build our own connector. 
> Unfortunatley im stuck at this point.
> >
> > Could you give me some hints on what are the basic steps to 
> make Mylyn recognise task hierarchies and show them in the task list?
> >
> > Thanks in advance.
> >
> > Regards Sebastian
> >
> >
> >
> > ----------------------------------------------------------------
> > Please note: This e-mail may contain confidential 
> information intended 
> > solely for the addressee. If you have received this e-mail 
> in error, 
> > please do not disclose it to anyone, notify the sender 
> promptly, and 
> > delete the message from your system.
> > Thank you.
> >
> >
> > _______________________________________________
> > mylyn-integrators mailing list
> > mylyn-integrators@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/mylyn-integrators
> >
> >
> _______________________________________________
> mylyn-integrators mailing list
> mylyn-integrators@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/mylyn-integrators
> 


----------------------------------------------------------------
Please note: This e-mail may contain confidential information
intended solely for the addressee. If you have received this
e-mail in error, please do not disclose it to anyone, notify
the sender promptly, and delete the message from your system.
Thank you.


Back to the top