Edgewall Software

Changes between Initial Version and Version 1 of Ticket #12414


Ignore:
Timestamp:
Mar 24, 2016, 10:43:50 AM (3 years ago)
Author:
Jun Omae
Comment:

You could use TicketModule.grouped_changelog_entries().

    def _get_ticket_cnum(self, ticket, modtime):
        for change in TicketModule(self.env) \
                      .grouped_changelog_entries(ticket, when=modtime):
            return change['cnum']

See tags/trac-1.0.10/trac/ticket/notification.py@:181-182,191#L165.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12414

    • Property Component generalticket system
  • Ticket #12414 – Description

    initial v1  
    11E.g. in `ITicketManipulator.validate_ticket` it is surprisingly difficult to get the comment number of the comment to be validated.
    22
    3 `ticket.get_comment_number(ticket['changetime'])` often gives the previous comment number, but fails e.g. when the a comment was edited. (th:12714)
     3`ticket.get_comment_number(ticket['changetime'])` often gives the previous comment number, but fails e.g. when the a comment was edited. (th:#12714)
    44
    55Am I missing something or could the API be improved somehow? Thanks.