Modify

Opened 2 years ago

#14135 new defect

Update Parent Tickets Cache Sooner

Reported by: Dan Owned by: Mark Ryan
Priority: normal Component: ChildTicketsPlugin
Severity: normal Keywords:
Cc: Trac Release:

Description

I'm not sure whether to call this a defect or an enhancement, but ...

When I'm adding a parent to a ticket via the parent field, the "Parent Tickets" area doesn't show up immediately in the ticket display, or even if the browser is refreshed. This can be confusing.

If I refresh the "parents" dictionary when the ticket is modified, it will appear right away. However, this might come with a significant performance penalty in some installations.

    # ITicketChangeListener methods

    def ticket_changed(self, ticket, comment, author, old_values):
        if 'parent' in old_values:
            del self.childtickets
            del self.parents

    def ticket_created(self, ticket):
        del self.childtickets
        del self.parents

The above code could likely be optimized. For instance, I'm assuming the ticket_created() path could be optimized to check if the parent field exists? Or maybe the dictionary could be tweaked for the specific action rather than running a new query?

Attachments (0)

Change History (0)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Mark Ryan.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.