timeoff-management / timeoff-management-application

Simple yet powerful absence management software for small and medium size business (community edition)
https://TimeOff.Management
MIT License
953 stars 589 forks source link

Carry over from previous year not working? #572

Open voyto opened 10 months ago

voyto commented 10 months ago

Morning all (Happy New Year),

I set a reminder for this morning to carry over unused balance from 2023 to this new year. The interface now correctly states "This action will carry over unused allowance for each employee from 2023 to the current year, 2024".

However, when I used the button - no values are changed. I do get a successful message too.

Is there a way I can manually edit these values instead? Thank you :)

fawzy-ibrhim commented 10 months ago

Me too facing the same issue

voyto commented 10 months ago

I assume I won't be able to get this working that easily - but I'm more than happy to manually enter the values into the database if that's possible? Does anyone know how to do this?

voyto commented 10 months ago

So, I managed to fix this fairly easily (manually). Thought I'd leave a comment for anyone else who'd like to follow along...

Please backup your data before following this - I'm no expert and only comment on what I've done. I run inside a VM, so just backed up the entire VM first.

The database is stored as an sqlite file (db.development.sqlite) within the root folder. In my scenario it was /home/user/timeoff-management/db.development.sqlite

I used WinSCP to connect to the server and copy this file to my desktop.

From there, I used a tool (just from a quick google search) called Beekeeper Studio to open that database. No passwords required.

I then opened the table 'user_allowance_adjustment' and filtered by year for '2024'.

I then just manually edited the 'carried_over_allowance' value for each employee. You can learn their ID from the Users table (or use the webpage to see their ID in the addressbar).

Once done, apply values and use WinSCP to overwrite the old database.

That's it - the new values should now show on the web UI.

voyto commented 10 months ago

Here's a more lightweight, free tool for editing the database.

https://github.com/little-brother/sqlite-gui/tree/1.8.2