Exchange rates and foreign currencies disappearing

This could be a single bug but I noticed the following in exchange rates:

  • The foreign currency of all my exchange rates since 2018 have disappeared.

  • The edit screen has no field for foreign currency exchange

  • I imported a batch and then tried to undo the batch thinking that the error was because of the batch headers because I used “key” instead of “currency” but when I try to undo it, nothing happens and the batch still appears in history as well in Exchange rates setting.

  • The last thing, Exchange rates setting disappeared from Settings menu.


Notes:

  1. I tried batch deleting all exchange rates and batch create all of them again but I am still experiencing the same problem.

  2. As I said earlier, I batch created a few exchange rates with wrong headers, not sure if this caused some kind of data corruption but it seems worth mentioning.

  3. I can still access exchange rates directly using the URL but the link in settings disappeared.

  4. I checked another business on the same cloud server and all exchange rates seem fine.

I’ve seen that after entering a new currency in Foreign Currencies, the option Exchange Rate appears.

@Mark I think that is normal. There is no need for Exchange Rate settings when you have only one currency.

The only thing I can suggest is to check whether your foreign currencies are still present. Exchange rates are not possible without a foreign currency being defined. I did not quite follow your description of batch operations, but I suspect somehow you have orphaned currencies and/or exchange rates.

I agree with you @Tut plus I have failed to reproduce it after many attempts. But I’m still trying.

Foreign Currencies are all gone. But I don’t understand, for a moment they were all there and they just disappeared.

What happens if you restore one of the missing foreign currencies (exactly as it was). Does anything else come back?

That’s a bit more complicated than that since:

  • The foreign currencies were not deleted by me or by anybody else
  • As a result I there’s no mention of the deletion anywhere in history so I cannot undo it
  • I re-created all of the “lost” foreign currencies but the linkages to the exchange rates are lost since the new ones have different UUID. I can force the new UUID to match the old ones if only I had batch create option, but unfortunately this option is not available for foreign currencies.

Anyway, after creating new foreign currencies the Exchange Rates setting is back but here’s how it looks

The weird thing is that I pulled the foreign currency UUIDs from manager just before this situation happened. What’s even weirder is that there’s no record of any deletions and there’s been around 1200 existing exchange rates. How could the foreign currency just disappear when there’s exchange rates referencing it?

Also, what @Mark mentioned wasn’t as @Abeiku understood. @Mark says that this happens when he creates a new foreign currency so that suggests he has at least 1 foreign currency and that’s not the expected behavior.

Well, @lubos needs to look at this. Since a moderator cannot reproduce it, it cannot go into bugs, especially since your other businesses are OK.

1 Like

The only way batch update could cause this state is if you would put Currency UUID under Key column. I will need to put some safe-guards into batch update and batch create so these functions cannot mess up other parts of the system even when changing values under Key column.

Yeah, you can fix this by creating foreign exchange rates and ensure they have original UUID. This will bring everything back to normal. I’ve added batch operations for foreign currencies to the latest version (21.9.19)

2 Likes

That’s exactly what happened. That’s a moment that I am not particularly proud of. But at least my stupid mistake made batch create more fool proof.

That’s a life saver. Thanks a lot.