From a30ed80e16421c296000edcb7e6b102e94135103 Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Fri, 16 Mar 2012 12:01:54 +0100 Subject: [PATCH] fix subreport field definition - needs a reportFactory parameter --- expert/field.py | 2 +- organize/work/report.py | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/expert/field.py b/expert/field.py index d87165a..567e6e4 100644 --- a/expert/field.py +++ b/expert/field.py @@ -187,4 +187,4 @@ class SubReportField(Field): def getValue(self, row): ri = self.getReportInstance(row) - return ResultSet(ri, ri.getResults()) + return ri.getResults() diff --git a/organize/work/report.py b/organize/work/report.py index c658b48..1851464 100644 --- a/organize/work/report.py +++ b/organize/work/report.py @@ -130,18 +130,6 @@ state = Field('state', u'State', description=u'The state of the work.', executionSteps=['query', 'output']) -# task/event report fields - -taskTitle = UrlField('title', u'Title', - description=u'The short description of the task.', - executionSteps=['output']) -taskDescription = TextField('description', u'Description', - description=u'The long description of the task.', - executionSteps=['output']) -workItems = SubReportField('workItems', u'Work Items', - description=u'A list of work items belonging to the task.', - executionSteps=['output']) - # basic definitions and work report instance @@ -249,6 +237,18 @@ class WorkReportInstance(ReportInstance): # meeting minutes +taskTitle = UrlField('title', u'Title', + description=u'The short description of the task.', + executionSteps=['output']) +taskDescription = TextField('description', u'Description', + description=u'The long description of the task.', + executionSteps=['output']) +workItems = SubReportField('workItems', u'Work Items', + description=u'A list of work items belonging to the task.', + reportFactory=WorkReportInstance, + executionSteps=['output']) + + class TaskRow(BaseRow): pass