No description
Find a file
helmutm 2036521b66 Work in progress: re-building loops package as a 'concept management framework'
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@808 fd906abe-77d9-0310-91a1-e0d9ade77398
2005-12-03 08:45:25 +00:00
browser Work in progress: re-building loops package as a 'concept management framework' 2005-12-03 08:45:25 +00:00
__init__.py first steps towards assigning subtasks through the web 2005-05-21 11:33:10 +00:00
concept.py Work in progress: re-building loops package as a 'concept management framework' 2005-12-03 08:45:25 +00:00
configure.zcml some minor improvements 2005-10-05 18:27:14 +00:00
interfaces.py use OOSet and separate Relation objects for subtask relations 2005-08-10 18:58:00 +00:00
README.txt basic implementation for subtask assignment working again (with the cybertools.relation package) 2005-11-09 11:22:46 +00:00
tests.py work in progress: unit and doc tests (README.txt) set up 2005-11-08 21:43:59 +00:00

loops - Linked Objects for Organizational Process Services
==========================================================

  ($Id$)

Tasks and Subtasks
~~~~~~~~~~~~~~~~~~

Let's start with creating a few example tasks:

    >>> from loops.task import Task
    >>> t1 = Task()
    >>> t1.title
    u''

    >>> t2 = Task(u't2', u'Second Task')
    >>> t2.title
    u'Second Task'

Now we want to make the second task a subtask of the first one.

In order to do this we first have to provide a relations registry. For
testing we use a simple dummy implementation.

    >>> from cybertools.relation.interfaces import IRelationsRegistry
    >>> from cybertools.relation.registry import DummyRelationsRegistry
    >>> from zope.app.testing import ztapi
    
    >>> ztapi.provideUtility(IRelationsRegistry, DummyRelationsRegistry())

Now we can assign the task t2 as a subtask to t1:
        
    >>> t1.assignSubtask(t2)

We can now ask our tasks for their subtasks and parent tasks:

    >>> st1 = t1.getSubtasks()
    >>> len(st1)
    1
    >>> t2 in st1
    True
    >>> len(t1.getParentTasks())
    0
        
    >>> pt2 = t2.getParentTasks()
    >>> len(pt2)
    1
    >>> t1 in pt2
    True
    >>> len(t2.getSubtasks())
    0