Search

Ticket Report: Associations field's tooltip should display ticket name

Subscribe to Ticket Report: Associations field's tooltip should display ticket name 6 post(s)

 
Hendy Irawan

How to:

  1. Display “Associations” on a ticket report
  2. Hover on an association, e.g. “S666”
  3. “Display Sibling ticket #666” is displayed. This should be “Ticket #666: Really weird bug on some strange thing”, which clearly names the ticket.
 
David C.

Hendy,

That would be nice. However, the ticket summaries are not currently displayed in the tooltips for performance reasons. Displaying the ticket summary would require us to load additional information for each of the associated tickets — a potentially expensive process, especially for larger ticket reports.

As always, thanks for your feedback Hendy.

 
Hendy Irawan

Assuming my perspective below is correct, I would disagree.

  1. You already got the referred ticket IDs in an array, don’t you?
  2. ticket_names = {}
    connection.select_all(
    SELECT id, name FROM tickets WHERE id IN (#{ids.join(’, ’)}”).each do |row|
    ticket_names[row[‘id’]] = row[‘name’]
    end

It would add only one SQL query on each report. With properly indexed tables, I don’t think it’s an expensive process.

If you’re referring to :include => :referred_tickets, yeah, that’s expensive… but there are betters ways to solve this problem.

 
DW

+1 for tooltip

 
Joshua Frappier

Hendy,

After digging deeper, as you suggested, there was indeed an easier way for us to get the associated ticket’s summary. You will find that the tooltip text now includes a full summary for the associated ticket.

Thanks again for the initial suggestion and especially for taking the time to provide a possible solution.

Josh

 
Hendy Irawan

Thank you. I appreciate it a lot :-)