Modify

Opened 14 years ago

Closed 11 years ago

#7312 closed defect (fixed)

The option (delete this ticket from database) will cause a wrong redirect

Reported by: evb Owned by: Ryan J Ollos
Priority: normal Component: TicketMoverPlugin
Severity: major Keywords: delete ticket
Cc: Trac Release: 0.12

Description

If you move the ticket and you select also the option to delete the ticket in the source project, you will get a error : Environment not found

The url points to something not existing : http://localhost:8080/ticket/4 (in my case)

Attachments (0)

Change History (3)

comment:1 Changed 14 years ago by Nathan Bird

evb:

I think this might be an issue with your trac configuration.

When the plugin moves the ticket, it asks the destination environment for an absolute href(here) and then redirects to that location(here).

I suspect you need to set the base_url config variable in the trac section.

comment:2 in reply to:  1 Changed 11 years ago by Ryan J Ollos

Owner: changed from Jeff Hammel to Ryan J Ollos
Status: newassigned

Replying to UnwashedMeme:

I suspect you need to set the base_url config variable in the trac section.

Yeah, I think that is right. When a ticket is moved but not deleted, you'll also see comments such as moved to /ticket/1 if the base_url hasn't been set in the target project. If the base_url has been set in the target project, the comment will include an link element pointing to the target.

I tend to think that the best thing to do in this case would be to not allow a ticket to be moved to a project that doesn't have the base_url set by excluding those projects as possible targets. How would we indicate that the base_url needs to be set? We could document it and add some info to the Trac log.

For now though, I've added code to raise a TracError if the base_url hasn't been set in the target environment.

comment:3 Changed 11 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

(In [13219]) Fixes #7312: Raise a TracError if a redirect to the target project has been requested by selecting Delete this ticket from the database but the base_url has been set in the target project.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.