#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. |
Description
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 basic-workflow.
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): 731 731 raise BackupError(e) 732 732 733 733 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() 739 740 del self.database_version 740 741 return True
Attachments (0)
Change History (6)
comment:1 by , 8 years ago
comment:2 by , 8 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 , 8 years ago
Milestone: | 1.0.13 → 1.3.1 |
---|---|
Release Notes: | modified (diff) |
comment:4 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Regression fixed in r14997.
comment:5 by , 5 years ago
Release Notes: | modified (diff) |
---|
comment:6 by , 5 years ago
Internal Changes: | modified (diff) |
---|
It seems this issue is introduced in [14888/trunk]. Then, I think 1.0-stable doesn't have it.