2.6.9 exchange rate structure change and reports

Geert Janssens geert.gnucash at kobaltwit.be
Thu Oct 22 04:19:53 EDT 2015


On Wednesday 21 October 2015 19:29:49 John Ralls wrote:
> > On Oct 20, 2015, at 3:17 PM, Wm... <tcnw81 at tarrcity.demon.co.uk>
> > wrote:
> > 
> > Fri, 16 Oct 2015 07:20:45
> > <380C9B08-7C86-49C3-879E-4115216C7575 at ceridwen.us> John Ralls
> > <jralls at ceridwen.us> wrote...
> > 
> >>> On Oct 15, 2015, at 4:04 PM, Wm... <tcnw81 at tarrcity.demon.co.uk>
> >> 
> >> wrote:
> >>> I'm not sure if I'm missing something but should reports, e.g.
> >> 
> >> balance sheets, know about the fact that exchange rates that were
> >> 
> >>> fraction buys 1
> >>> 
> >>> are now
> >>> 
> >>> 1 buys many?
> >> 
> >> My reports seem to be stuck at the exchange rate last collected
> >> using
> > 
> > the 2.6.8 structure.
> > 
> >> Hopefully I'm doing something wrong otherwise all reports involving
> > 
> > currencies that inverted are going to be increasingly out of date
> > over time.> 
> >> An example of not-insignificant currencies inverting is GBP / USD
> > 
> > Yes, and I had thought that they already checked in both directions.
> > I’ll take a look.
> > 
> > 
> > 
> > The wrong exchange rate is being used on the main accounts display
> > too if one of the "Name (Currency)" columns is displayed.
> > 
> > I've tried having a look in the code but it is taking me too long to
> > find.
> > 
> > If there are no pre 2.6.9 prices in a book it gets the right one.
> > 
> > Not sure if this is a re-opening of an old bug but I have added a
> > new one with example books anyway and hope I got it right
> > 
> > https://bugzilla.gnome.org/show_bug.cgi?id=756889
> 
> Yeah, it only looks at the “reverse” quotes if there are no “forward”
> quotes, and even that’s in only a few places.

That's a change I once made while working on the transfer dialog. Before it didn't even 
consider "reverse" quotes. With your work on the pricedb this would have to be updated again 
to look for a price in both forward and reverse quotes and prefer the one closest in time.

> I don’t know why I
> didn’t recognize that that was the wrong way when I first looked at
> it. A possible work-around if you’re not interested in historical
> prices is to use the “Remove Old” button on the price editor. That
> won’t fix everything, but it will fix the places where it looks for
> “reverse” quotes and where the direction doesn’t switch much.
> 
> I’ve got a better design in progress, where both directions are
> queried and the results sorted chronologically. It’s in the pricedb
> code so there will be no issue of having to call the query in each
> direction as is the case now, but calling code will need to check the
> direction of each returned price and use it accordingly.
> 
Even better.

> This is becoming a much bigger change than I initially thought it
> would be. Perhaps it would be better to revert the pricedb back to
> the 2.6.7 state and apply it to master for the next major version.
> Any votes one way or the other?
> 
I agree it's getting big for the stable series. So agreed to revert to the 2.6.7 state and do the 
work on master only.

Will reverting back have any side effects considering some users have already been fetching 
quotes with the new system ? I guess that some will need to manually enter prices in the 
opposite direction if they want to have historical quotes for the 2.6.8/2.6.9 period ? On the 
other hand they'll have to do that now already as well and will continue to have to do so if we 
don't revert/until your better design is implemented. Something to mention in the release 
notes, I guess...

Geert


More information about the gnucash-user mailing list