Edgewall Software

Opened 6 years ago

Closed 6 years ago

Last modified 2 years ago

#12539 closed defect (fixed)

[ticket-workflow] is restored to default on environment upgrade

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.3.1
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Fixed regression in r14888.


I noticed that when upgrading the environment the following message always appears:

==== Upgrade Notice ====

The ticket Workflow is now configurable.

Your environment has been upgraded, but configured to use the original
workflow. It is recommended that you look at changing this configuration to use

On upgrading from Trac 1.0.x to the trunk, the [ticket-workflow] section is overwritten.

The problem is that every upgrade participant is executed when upgrading the environment, therefore trac.ticket.default_workflow.ConfigurableTicketWorkflow.upgrade_environment is always executed. The following change would fix the issue:

  • trac/env.py

    diff --git a/trac/env.py b/trac/env.py
    index fce6b01..8e95b07 100644
    a b class Environment(Component, ComponentManager):  
    731731                raise BackupError(e)
    733733        for participant in self.setup_participants:
    734             self.log.info("%s.%s upgrading...", participant.__module__,
    735                           participant.__class__.__name__)
    736             participant.upgrade_environment()
    737             # Database schema may have changed, so close all connections
    738             DatabaseManager(self).shutdown()
     734            if participant.environment_needs_upgrade():
     735                self.log.info("%s.%s upgrading...", participant.__module__,
     736                              participant.__class__.__name__)
     737                participant.upgrade_environment()
     738                # Database schema may have changed, so close all connections.
     739                DatabaseManager(self).shutdown()
    739740        del self.database_version
    740741        return True

Attachments (0)

Change History (6)

comment:1 by Jun Omae, 6 years ago

It seems this issue is introduced in [14888/trunk]. Then, I think 1.0-stable doesn't have it.

comment:2 by Christian Boos, 6 years ago

You just beat me to it ;-)

Yeah, this is a regression. The 1.2-stable branch doesn't have the issue either (diff:branches/1.2-stable/trac/env.py//trunk/trac/env.py).

comment:3 by Ryan J Ollos, 6 years ago

Release Notes: modified (diff)

comment:4 by Ryan J Ollos, 6 years ago

Resolution: fixed
Status: assignedclosed

Regression fixed in r14997.

comment:5 by Ryan J Ollos, 2 years ago

Release Notes: modified (diff)

comment:6 by Ryan J Ollos, 2 years ago

Internal Changes: modified (diff)

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.