#12749 closed defect (fixed)
Prevent creating ticket with empty summary
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | XmlRpcPlugin |
Severity: | normal | Keywords: | |
Cc: | Olemis Lang | Trac Release: |
Description
Trac doesn't allow creating a ticket with an empty summary through the web interface. Is there any reason that XmlRpcPlugin shouldn't enforce this constraint as well? See trac:#12458 for background.
Attachments (0)
Change History (7)
comment:1 follow-up: 2 Changed 9 years ago by
comment:2 Changed 9 years ago by
Replying to osimons:
No, no real reason for this. As Trac lacks any general usable API for such calls, the RPC plugin is left to re-create nuances and generally fails.
I ran into similar issue while working on Bloodhound. In the near term I'll look into preparing a patch for XmlRpcPlugin, and also modify Trac so we don't get a traceback on the ticket or timeline page for a ticket with an empty summary.
comment:3 follow-up: 5 Changed 8 years ago by
Same request goes for owner. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=499120
When I create a new ticket and I do not set an owner for the ticket, mylyn does not use the default user for the given component of the ticket.
comment:4 Changed 8 years ago by
Owner: | changed from osimons to Ryan J Ollos |
---|---|
Status: | new → accepted |
I'll just mention for future reference, [trac 15861#file0] (trac:#11723) moved the ticket validation into an ITicketManipulator
implementation which XmlRpcPlugin could probably utilize in a future version that is only compatible with Trac 1.3.2+.
comment:5 Changed 8 years ago by
Replying to torsten.piotraschke@…:
Same request goes for owner. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=499120
When I create a new ticket and I do not set an owner for the ticket, mylyn does not use the default user for the given component of the ticket.
See #10738.
comment:7 Changed 8 years ago by
Tested on trac-hacks.org:
>>> p.ticket.create('', 'the description', {}) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1243, in __call__ return self.__send(self.__name, args) File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1602, in __request verbose=self.__verbose File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1283, in request return self.single_request(host, handler, request_body, verbose) File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1316, in single_request return self.parse_response(response) File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1493, in parse_response return u.close() File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 800, in close raise Fault(**self._stack[0]) xmlrpclib.Fault: <Fault 1: "'Tickets must contain a summary.' while executing 'ticket.create()'">
No, no real reason for this. As Trac lacks any general usable API for such calls, the RPC plugin is left to re-create nuances and generally fails. There is very little validation in place, nor are ticket manipulator plugins called as part of the process. See #10738 for discussion and pointers.