Opened 8 years ago

Closed 5 years ago

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

Reported by: Owned by: evb Ryan J Ollos normal TicketMoverPlugin major delete ticket 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)

### comment:1 follow-up:  2 Changed 7 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 5 years ago by Ryan J Ollos

Owner: changed from Jeff Hammel to Ryan J Ollos new → assigned

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 5 years ago by Ryan J Ollos

Resolution: → fixed assigned → closed

(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