ticket_xrefs_display

one of the documented procedures in this installation of the ACS
Usage:
ticket_xrefs_display   db   my_msg_id   return_url
What it does:
display the xref tickets with a link to unlink
Defined in: /web/philip/tcl/ticket-defs.tcl

Source code:

 

    set selection [ns_db select $db "
 select to_ticket, from_ticket, one_line, to_ticket as view_ticket
 from ticket_xrefs, ticket_issues
 where  to_ticket = ticket_issues.msg_id and from_ticket=$my_msg_id
    UNION
 select to_ticket, from_ticket, one_line, from_ticket as view_ticket
 from ticket_xrefs, ticket_issues
 where  from_ticket = ticket_issues.msg_id and to_ticket=$my_msg_id"]

    append page "<br><strong>Related tickets:</strong><ul>"
    while {[ns_db getrow $db $selection]} {
        set_variables_after_query

        append page "<li>\#<a href=\"issue-view?msg_id=$view_ticket&[export_url_vars return_url]\">$view_ticket</a> $one_line
  &nbsp;&nbsp; (<a href=\"ticket-unlink?from_ticket=$from_ticket&to_ticket=$to_ticket&return_url=[ns_urlencode "[ns_conn url]?[export_ns_set_vars url]"]\">unlink</a>)"
    }
    append page "<form action=\"ticket-link\">Link ticket \#<input type=text maxlength=8 size=6 name=to_ticket><input type=hidden name=return_url value=\"[philg_quote_double_quotes "[ns_conn url]?[export_ns_set_vars url]"]\"><input type=hidden name=from_ticket value=\"$my_msg_id\"> &nbsp; 
    <input type=submit value=\"Link\">
    </form>"
    append page "</ul>"                  


    return $page


philg@mit.edu