# Ticket #4184 (closed defect: fixed)

Opened 4 years ago

## Trac stuck in "environment needs to be upgraded" since deleting a T&E report

Reported by: Assigned to: ben3@holler.co.uk bobbysmith007 normal TimingAndEstimationPlugin blocker felipe@redecolibri.com.br 0.11

### Description

Trac Error:

Trac Error

TracError: The Trac Environment needs to be upgraded.

Log message:

2008-12-01 10:03:57,860 Trac[loader] DEBUG: Loading roadmaphours from
--snip--
2008-12-01 10:03:57,900 Trac[api] DEBUG: T&E needs upgrades for the following
2008-12-01 10:03:57,905 Trac[api] DEBUG: NEEDS UP?: sys:False, rep:True, stats:False,
fields:False, man:False
2008-12-01 10:03:57,910 Trac[api] DEBUG: T&E needs upgrades for the following
2008-12-01 10:03:57,910 Trac[env] WARNING: Component
<timingandestimationplugin.api.TimeTrackingSetupParticipant object at 0x2b0e146f5410>


I'm not sure what's caused it, but I seem to remember deleting a report by accident a few days ago. Not sure why it'll have broken this severely though?

Disabling the plugin and all of its components fixes the problem

I'm running Trac 0.11 on CentOS 5.2, with Python 2.4.

## Change History

### 12/01/08 13:50:38 changed by ben3@holler.co.uk

Enabling all components except TimeTrackingSetupParticipant fixes things

### 01/19/09 11:49:17 changed by bobbysmith007

Ughh... The setup code has consistently proven to be the most difficult to get correct.

Probably the easiest way to get your environment back to working normally is to go delete the row with uuid:040c9025-7641-4d18-96ad-2b26b4095566 from the custom_report table.

My guess is that when the report was deleted it was not removed from the custom report table so the program is essentially finding the report half installed.

I may at somepoint try to tackle the bugs in the setup script that are causing this problem, but for now, you should at least be able to get it upgraded so that the setupparticipant will not complain constantly.

OTOH you wont really need the setup participant until you upgrade and you could just fix the problem then.

HTH, Russ

### 02/09/09 18:17:27 changed by watho

I can confirm this bug after deleting a report. Running the upgrade it says the report is already newer.

MfG Watho

### 02/13/09 18:40:00 changed by bobbysmith007

• cc set to felipe@redecolibri.com.br.
• status changed from new to assigned.

A few people are having this problem, but unfortunately I am very busy at work at the moment, and so will not be able to fix this for a week or two more. I would suggest using the above fix (disabling the SetupParticipant) until I can get it fixed.

### 02/24/09 12:19:30 changed by koma

any progress on this one ? Two different trac environments here suffer from this behaviour. At first, running the upgrade seemed to work or at least trac recovered after a few refreshes. But this time, it seems to have given up completely.

thx for the effort;

### 03/13/09 10:14:32 changed by fatorres2004@hotmail.com

Hi.. I resolved this problem by this way: 1) Connect to trac.db (sqliteadmin) 2) Open report Table 3) view column Id and insert id row lost (in my case row with Id = 12) 4) upgrade trac env (trac-admin ... upgrade)

Report for T&E (csv format) id,author,title,query,description 10,Timing and Estimation Plugin,Ticket Work SummaryReports Must Be Accessed From the Management Screen 11,Timing and Estimation Plugin,Milestone Work SummaryReports Must Be Accessed From the Management Screen 12,Timing and Estimation Plugin,Developer Work SummaryReports Must Be Accessed From the Management Screen 13,Timing and Estimation Plugin,Ticket HoursReports Must Be Accessed From the Management Screen 14,Timing and Estimation Plugin,Ticket Hours with DescriptionReports Must Be Accessed From the Management Screen 15,Timing and Estimation Plugin,Ticket Hours Grouped By ComponentReports Must Be Accessed From the Management Screen 16,Timing and Estimation Plugin,Ticket Hours Grouped By Component with DescriptionReports Must Be Accessed From the Management Screen 17,Timing and Estimation Plugin,Ticket Hours Grouped By MilestoneReports Must Be Accessed From the Management Screen 18,Timing and Estimation Plugin,Ticket Hours Grouped By MileStone? with DescriptionReports Must Be Accessed From the Management Screen

### 04/06/09 20:43:58 changed by bobbysmith007

• status changed from assigned to closed.
• resolution set to fixed.

(In [5491]) fixes #4184 Reworked the report upgrade code to allow deletion of reports. If the report version is updated the report is reinstalled.

### 04/06/09 20:45:09 changed by bobbysmith007

If you continue to experience these problems after a reinstall of the new version, please reopen the ticket with some log messages to help me track down the problem.

I will be porting these changes to the permissions branch shortly.

### 04/06/09 20:53:24 changed by bobbysmith007

(In [5493]) re #4184 ported changes to permissions branch and fixed a missing function ref in reportmanager

### Add/Change #4184 (Trac stuck in "environment needs to be upgraded" since deleting a T&E report)

Change Properties