work in progress: new work item lifecycle
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3134 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
468f0a461a
commit
e3a8493d31
3 changed files with 7 additions and 7 deletions
|
@ -94,10 +94,10 @@ by calling the form controller's update method
|
|||
False
|
||||
|
||||
>>> list(workItems)
|
||||
[<WorkItem ['36', 1, '33', '2008-12-28 19:15', 'finished']:
|
||||
[<WorkItem ['36', 1, '33', '2008-12-28 18:00', 'finished']:
|
||||
{'comment': u'Comment', 'end': 1230491700, 'description': u'Description',
|
||||
'created': ..., 'creator': '33', 'assigned': ...,
|
||||
'start': 1230487200, 'duration': 4500, 'effort': 900}>]
|
||||
'created': ..., 'creator': '33', 'start': 1230487200,
|
||||
'duration': 4500, 'effort': 900}>]
|
||||
|
||||
>>> from loops.organize.work.browser import WorkItemView, WorkItemsView
|
||||
>>> wi01 = workItems['0000001']
|
||||
|
|
|
@ -84,7 +84,7 @@ class WorkItemsView(BaseWorkItemsView, NodeView):
|
|||
return result
|
||||
for wi in workItems.query(task=util.getUidForObject(target)):
|
||||
result.append(WorkItemDetails(self, wi))
|
||||
return result
|
||||
return sorted(result, key=lambda x: x.track.timeStamp)
|
||||
|
||||
|
||||
class UserWorkItems(BaseWorkItemsView, ConceptView):
|
||||
|
@ -106,7 +106,7 @@ class UserWorkItems(BaseWorkItemsView, ConceptView):
|
|||
for target in self.context.getParents([self.defaultPredicate]):
|
||||
for wi in workItems.query(userName=util.getUidForObject(target)):
|
||||
result.append(WorkItemDetails(self, wi))
|
||||
return result
|
||||
return sorted(result, key=lambda x: x.track.timeStamp)
|
||||
|
||||
|
||||
# single work items
|
||||
|
|
|
@ -31,5 +31,5 @@ class SetupManager(BaseSetupManager):
|
|||
|
||||
def setup(self):
|
||||
records = self.context.getRecordManager()
|
||||
work = self.addObject(records, TrackingStorage, 'work',
|
||||
trackFactory=WorkItem)
|
||||
if 'work' not in records:
|
||||
records['work'] = TrackingStorage(trackFactory=WorkItem)
|
||||
|
|
Loading…
Add table
Reference in a new issue