Modify

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#927 closed defect (fixed)

All reports fail with "UNION types text and real cannot be matched"

Reported by: Alessio Owned by: Russ Tyndall
Priority: highest Component: TimingAndEstimationPlugin
Severity: blocker Keywords:
Cc: Trac Release: 0.10

Description

Testing done on on Trac 0.10.2/Postgres 8.1.4/Python 2.4.3/Win32

Report execution failed: ERROR: UNION types text and real cannot be matched

I did define start and end dates and selected all the tickets I have in the dataset (i.e. 4), which I also populated with non-zero estimations and work-done hours.

Attachments (1)

reports.py (21.0 KB) - added by Alessio 17 years ago.
Postgres UNION problem fix plus some formatting improvements

Download all attachments as: .zip

Change History (12)

comment:1 Changed 17 years ago by Alessio

I forgot to mention that I checked out rev 1585 of the plugin

comment:2 Changed 17 years ago by Russ Tyndall

This is due to the fact that this plugin is still experimental as far as postegres is concerned.

I will attempt to fix the reports, but as I don't have a postegres setup, this is pretty much shooting in the dark. If you can fix the reports so that they actually work in postegres and then post them to this ticket that would be awesome. Otherwise, I will see what I can do. The reports have been very finicky due to the differences between the various database back ends supported by trac.

Please also see #861 for an idea on some of the work that has been done

I will be uploading a new version that will hopefully fix this bug momentarily (next ten minutes)

comment:3 Changed 17 years ago by Russ Tyndall

Update to svn head and try again,

I think I fixed that immediate problem,

Thanks for the error report, Russ

comment:4 Changed 17 years ago by Russ Tyndall

btw, Just to clarify, you don't have to specify a start and end... if you don't it defaults to all the tickets.

comment:5 Changed 17 years ago by Alessio

Updated to rev 1586 and redone a "python setup.py install"+restarted apache (python says it has removed version 0.2.6 and added 0.2.7, so I guess I'm running the right code:-) but the problem is still there.

I'm not a python guru, but I'll do my best to help you fix this :-)

comment:6 Changed 17 years ago by Russ Tyndall

You might need to trac upgrade... though if it is not saying this to you it makes me suspect that something is wrong.

You can fix this entirely from within the web interface. If you go to any of the reports that are failing, you should be able to edit the report to bring up the sql for it. If you find what is causing the sql to break, you can resave it then reopen the report from the billing page (to get all the query string variables) to test that it worked.

If you look at what i was changing in this changeset:1586. You can see that mostly I am adding cast statements where I think the problem is coming from.

Any help is greatly appreciated (I have been attempting to fix this for a few weeks, but without postegres, I am stuck waiting on someone else to verify whether it is still broken or not.

Russ

comment:7 Changed 17 years ago by Russ Tyndall

by trac upgrade, I mean trac-admin upgrade (which should tell you that it is replacing the reports).

comment:8 Changed 17 years ago by Alessio

I hadn't realized I needed to upgrade the trac. Indeed, you fixed the UNION problem in a couple of places, but there were more similar issues, plus others.

I'll attach a fix to the UNION problem and the following:

  1. in a couple of reports the grouping header was repeated as a field in each group.
  2. a few reports were breaking the line after the summary which is usually short. I thought it looked better if I allowed it to span 2 lines.
  3. some SQL comments and indentations were making the code a bit hard to read so I rearranged a little
  4. I changed text like "Time Summary..." to "Total hours...". I think the former does not work in English, but I'm not an expert :-P
  5. Because of the purpose of the plugin, the reports speak "hours". But many companies estimate and plan in other units (e.g. story points - think of the ScrumBurndownPlugin that uses this plugin). I thought it would made a lot more people happier and less confused if the reports said "work" i.s.o. "hours". The report titles cannot be changed because otherwise the upgrade procedure leaves the old ones in place.

I hope you'll find the above useful and not too invasive.

Changed 17 years ago by Alessio

Attachment: reports.py added

Postgres UNION problem fix plus some formatting improvements

comment:9 Changed 17 years ago by Russ Tyndall

Resolution: fixed
Status: newclosed

AWESOME,

I have rolled in your changes, bumped the version number and committed. I like the fact that you moved away from hours to a more generic "work". I will probably write some code into a future update to change the report names and entry box labels. (I had already gotten requests for different units.) Thank you very much for getting this working. I have added you to an authors comment block in the setup.py. If you want to provide more than your trac-hacks name, I would be happy to include that info as well.

Russ

comment:10 Changed 17 years ago by Russ Tyndall

changeset:1606.

Btw, you had missed a couple of version numbers, I think I got them all, but if you notice a report missing your changes after an upgrade please let me know and I can bump the report version number.

Russ

comment:11 Changed 17 years ago by Alessio

My full name is Alessio Massaro. Glad to help. btw, there's a typo in setup.py. You wrote "postgre" instead of "postgres"

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Russ Tyndall.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.