[CMF-checkins] CVS: CMF/CMFCollector/skins/collector - collector_add_issue.py:1.8
Ken Manheimer
klm@zope.com
Thu, 15 Nov 2001 18:03:18 -0500
Update of /cvs-repository/CMF/CMFCollector/skins/collector
In directory cvs.zope.org:/tmp/cvs-serv15609
Modified Files:
collector_add_issue.py
Log Message:
Implemented tolerance for sendmail delivery problems, without
completely hiding the problems.
Splash any followup error notice in the destination web page, using
portal_status_message.
=== CMF/CMFCollector/skins/collector/collector_add_issue.py 1.7 => 1.8 ===
##title=Submit a Request
+from Products.PythonScripts.standard import url_quote_plus
+
REQGET = context.REQUEST.get
-id = 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, 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'))
+
+dest = "%s/%s" % (context.absolute_url(), id)
+if err:
+ dest += '?portal_status_message=' + url_quote_plus(err)
-context.REQUEST.RESPONSE.redirect("%s/%s" % (context.absolute_url(), id))
+context.REQUEST.RESPONSE.redirect(dest)