Modify

Opened 4 years ago

Closed 17 months ago

#7312 closed defect (fixed)

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

Reported by: evb Owned by: rjollos
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 follow-up: Changed 4 years ago by UnwashedMeme

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 17 months ago by rjollos

  • Owner changed from k0s to rjollos
  • Status changed from new to assigned

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 17 months ago by rjollos

  • Resolution set to fixed
  • Status changed from assigned to 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.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.