Edgewall Software

Changes between Initial Version and Version 2 of Ticket #12706


Ignore:
Timestamp:
Sep 10, 2017, 5:28:49 AM (7 years ago)
Author:
Ryan J Ollos
Comment:

On the ticket page we guess that the user has come from a query if the ticket id is in the list of results from the most recently visited query: req.session['query_tickets'].

We could do the same for ticket delete:

  • tracopt/ticket/deleter.py

    diff --git a/tracopt/ticket/deleter.py b/tracopt/ticket/deleter.py
    index 15a2411d9..b1701d6ca 100644
    a b class TicketDeleter(Component):  
    9393                ticket.delete()
    9494                add_notice(req, _("Ticket #%(num)s and all associated data "
    9595                                  "removed.", num=ticket.id))
    96                 req.redirect(req.href())
     96                redirect_to = req.href.query()
     97                if 'query_tickets' in req.session:
     98                    tickets = req.session['query_tickets'].split()
     99                    if str(ticket.id) in tickets:
     100                        redirect_to = req.session['query_href']
     101                req.redirect(redirect_to)
    97102
    98103            elif action == 'delete-comment':
    99104                cdate = from_utimestamp(long(req.args.get('cdate')))

Any other ideas?

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12706

    • Property Owner set to Ryan J Ollos
    • Property Status newassigned
    • Property Milestone1.3.3
  • Ticket #12706 – Release Notes

    initial v2  
     1Redirect to the query module after deleting a ticket. If the deleted ticket is in the list of results from the last query, the last query is displayed, otherwise the default query is displayed.