Edgewall Software

Opened 6 years ago

Closed 5 years ago

#12706 closed defect (fixed)

Return to query after a ticket delete

Reported by: Christian Boos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.3.3
Component: ticket system Version: 1.3dev
Severity: normal Keywords:
Cc: Branch:
Release Notes:

Redirect 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.

API Changes:
Internal Changes:


That is, if there's an active query. But maybe even the default query would be a better destination than returning to the wiki page.

Attachments (0)

Change History (3)

comment:1 by Ryan J Ollos, 5 years ago

Milestone: next-dev-1.3.x

comment:2 by Ryan J Ollos, 5 years ago

Milestone: next-dev-1.3.x1.3.3
Owner: set to Ryan J Ollos
Release Notes: modified (diff)
Status: newassigned

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)
    98103            elif action == 'delete-comment':
    99104                cdate = from_utimestamp(long(req.args.get('cdate')))

Any other ideas?

Last edited 5 years ago by Ryan J Ollos (previous) (diff)

comment:3 by Ryan J Ollos, 5 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r16323.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos to the specified user.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.