[CMF-checkins] CVS: CMF/CMFCollector/skins/collector - collector_add_issue.py:1.9 collector_contents.pt:1.27
Tres Seaver
tseaver@zope.com
Wed, 8 May 2002 09:39:30 -0400
Update of /cvs-repository/CMF/CMFCollector/skins/collector
In directory cvs.zope.org:/tmp/cvs-serv9794/CMFCollector/skins/collector
Modified Files:
collector_add_issue.py collector_contents.pt
Log Message:
- Ensure that test file doesn't get mangled on Windows.
=== CMF/CMFCollector/skins/collector/collector_add_issue.py 1.8 => 1.9 ===
-##parameters=title, security_related, submitter_email, topic, importance, classification, description, version_info
+##parameters=id=None, title='', description='', submitter_id=None, submitter_name=None, submitter_email='', supporters=(), kibitzers=(), security_related=0, topic=None, importance=None, classification=None, version_info=None, invisible=0, file=None, fileid=None, filetype=None
##title=Submit a Request
from Products.PythonScripts.standard import url_quote_plus
REQGET = context.REQUEST.get
-id, err = context.add_issue(title=title,
- security_related=security_related,
- submitter_name=REQGET('submitter_name'),
- submitter_email=submitter_email,
- description=description,
- topic=topic,
- classification=classification,
- importance=importance,
- version_info=version_info,
- assignees=REQGET('assignees', []),
- file=REQGET('file'),
- fileid=REQGET('fileid', ''),
- filetype=REQGET('filetype', 'file'))
+id, issue = context.add_issue( id, title, description )
+
+# The following methods return changes, which we don't care about, as
+# this is initial creation.
+issue.setSubmitter( submitter_id, submitter_name, submitter_email or None )
+issue.setSupporters( supporters )
+issue.setKibitzers( kibitzers )
+
+issue.setSecurityRelated( security_related )
+issue.setTopic( topic )
+issue.setClassification( classification )
+issue.setImportance( importance )
+issue.setVersionInfo( version_info )
+
+# Set initial transcript text, workflow state.
+err = issue.do_action( 'request', description, file, fileid, filetype )
dest = "%s/%s" % (context.absolute_url(), id)
+
if err:
dest += '?portal_status_message=' + url_quote_plus(err)
=== CMF/CMFCollector/skins/collector/collector_contents.pt 1.26 => 1.27 ===
<span tal:condition="not: numcmts"
tal:replace="nothing">
- </span><span tal:condition="item/assigned_to|nothing">,
+ </span><span tal:condition="item/listSupporters|nothing">,
Assigned:
- <span tal:content="python: ', '.join(item.assigned_to)">
+ <span tal:content="python: ', '.join(item.listSupporters())">
SUPPORTERS
</span>
</span>
@@ -263,7 +263,7 @@
<td align="center">
<select name="supporters:list:ignore_empty" multiple size="SIZE"
tal:define="values python:
- ordered(uniquevals('assigned_to'),
+ ordered(uniquevals('listSupporters'),
here.supporters)"
tal:attributes="size python: min(max(len(values), 3),
5)">
@@ -299,7 +299,7 @@
<tr>
<td align="center">
<select name="topics:list:ignore_empty" multiple size="SIZE"
- tal:define="values python: ordered(uniquevals('topic'),
+ tal:define="values python: ordered(uniquevals('getTopic'),
here.topics)"
tal:attributes="size python: min(max(len(values), 3), 5)">
<option value=""
@@ -315,7 +315,7 @@
<td align="center">
<select name="classifications:list:ignore_empty" multiple size="SIZE"
tal:define="values python:
- ordered(uniquevals('classification'),
+ ordered(uniquevals('getClassification'),
here.classifications)"
tal:attributes="size python: min(max(len(values), 3),
5)">
@@ -333,7 +333,7 @@
<td align="center">
<select name="importances:list:ignore_empty" multiple size="SIZE"
tal:define="values python:
- ordered(uniquevals('importance'),
+ ordered(uniquevals('getImportance'),
here.importances)"
tal:attributes="size python: min(max(len(values), 3),
5)">