Opened 15 years ago
Closed 14 years ago
#5445 closed enhancement (fixed)
Ability to specify the author for ticket comments/updates
Reported by: | Thijs Triemstra | Owned by: | osimons |
---|---|---|---|
Priority: | high | Component: | XmlRpcPlugin |
Severity: | major | Keywords: | |
Cc: | Thijs Triemstra, seniorsamu, Thomas Moschny | Trac Release: | 0.11 |
Description
Currently it's not possible to specify the author of a comment when using ticket.update(). It basically always uses the name of the user that invoked the xml-rpc call. When trying to reconstruct a ticket database this is obviously not an acceptable solution. See attached patch for a fix.
Attachments (2)
Change History (16)
Changed 15 years ago by
Attachment: | author-update.patch added |
---|
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
Type: | defect → enhancement |
---|
comment:3 Changed 14 years ago by
#7284 closed as duplicate. That also has a longer description of why this is a good idea, and also contains what looks like a nice patch.
I haven't looked into either patch yet, unfortunately.
comment:4 Changed 14 years ago by
Does it have any chance to make into the trunk soon? It is just a slight modification with no obvious impact on the core functionality but introducing a new function.
I checked both patches, they are pretty much the same.
comment:5 Changed 14 years ago by
Cc: | seniorsamu added |
---|
comment:8 Changed 14 years ago by
Cc: | Thomas Moschny added |
---|
To me the patch from #7284 looks nicer, because it doesn't change the signature of the ticket.update()
call.
comment:10 Changed 14 years ago by
Changed 14 years ago by
Attachment: | t5445-ticket_update_author-r9818.diff added |
---|
Same strategy, but adds author without breaking API + includes test.
comment:11 Changed 14 years ago by
I've added an updated patch that uses same strategy to add a new parameter for author
.
I've considered separate argument vs adding 'author' to attributes, and in the end decided that I prefer the explicit approach for an argument that is really not an attribute of the ticket - only of the individual update. Hiding it inside attributes just because it may look cleaner is not ideal, but when added as last optional argument the end-result is the same (-> no breaking changes).
BTW, not reflected in the patch but I'll update the version to 1.1.1 to make it easy to detect if this feature is present.
Good to go?
comment:12 Changed 14 years ago by
I did not test the patch, but from reading: shouldn't it default to req.authname
instead of ''
, when the optional author
argument is not present?
comment:14 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [9911]) XmlRpcPlugin: Add ability to create and update tickets from author other than the user making request, and at a timestamp other than 'now'. Added extra permission checks for both changes (admin only).
Thanks to all those that have contributed patches and feedback for these issues.
Ping :)