Would it be possible to add the standard categories to the managing list? This way the standard categories created for every new project could be removed on a per-project level - not all of them might be relevant for all projects.
Or are custom and standard categories treated fundamentally different in the code which would make such a feature hard to implement?
Yeah this isn't so simple indeed. I mean keeping the standard ones translated even if they become "normal" ones would be the easy part . They could be added (translated) on project creation.
The hard part would be to keep existing projects categories. All bills references to categories would be broken. Well a good old migration script could do it. Thinking of it, it would not have a big effect on MoneyBuster as it get the categories on each project sync... All that seems doable.
Thanks for the good idea. I'll do it after next release. At some point I have to freeze something, polish it and release .
Ah, that's actually a good idea, "freezing" the translations at project creation time. If these are made normal categories, all names can be manually edited later on anyway I guess.
Super cool, already looking forward to the next release. And if there are some "papercut" things I could solve (like: super super basic issues) let me know - I'd be happy to get my hands into PHP code, has been a while... :)
I've been thinking about this a little bit. The main problem is to stay compatible with old MoneyBuster versions... Categories are hard coded in MoneyBuster. It will be impossible to hide deleted old standard categories in old MoneyBuster. The dirty way to solve this would be ignore when MoneyBuster tries to update a bill with old standard hardcoded categories. Maybe not such a big deal. During the (short I hope) period with people having an old MoneyBuster, they will locally see old categories and as soon as they will update the app, things will be back in order.
Still a small problem : categories will appear twice in old MoneyBuster : the hardcoded ones and the "new normal standard" ones.
I guess there is no perfect solution to make a transition between old and new standard categories...I'll do it as I can. The feature is worth it.
Ah, this is indeed a little problem. But if we want this feature I guess there is little we can do server-side. One possible workaround would be to not send these categories to the app if it identifies itself as "old" MoneyBuster. But I'm not sure this is a) possible and b) worth the trouble.
I guess the only fallback we should take care of is that if the old MoneyBuster sends a bill with an invalid category that we catch that and set some default.
One possible workaround would be to not send these categories to the app if it identifies itself as "old" MoneyBuster
Simpler than that: new Cospend doesn't care and does not do any trick. Category list will be updated even in old MB. As bills will be updated in Cospend to point to new categories, well old MB will use new categories. The problem is if a user sets an old category in old MB. In that case, Cospend will ignore the modification.
Maybe that's more or less what you meant. Rephrasing does not hurt .
old bills categories are converted to freshly created ones
New projects have default categories
I just kept the 'reimbursement' hardcoded category because it's necessary . Auto settlement uses it and so does stats filtering.
If you can test this, great. If not well it will be progressively tested before next release.
MoneyBuster changes will come soon. We just have to make sure Cospend is updated before MoneyBuster...in most cases. Maybe the right thing to do is to keep hardcoded categories in MB long enough... I'm sure problems will arise anyway, they always do . Even if the changes seem simple, making the transition smooth and invisible is a challenge.
I think having the reimbursements as separate fixed item is fine - it's something functionally very specific that also every project eventually will need.
worst thing that happens is that the category is reset
Yes that's what I want to avoid .
You made me realize I forgot to do what I said about ignoring category edition involving a hardcoded category...but it's even better that way! Even if MoneyBuster sends a hardcoded category id, it is actually stored by Cospend!!! Sometimes planets are aligned.
So we still have a few problematic things left:
What shall we do when updating MB? What about the bills with hardcoded categories? We could just leave them like that. Hmmm that might be ok because MB will get updated bills from Cospend and normally all bills will have "real" categories...Ok that one is ok.
We have to take care of category adding and conversion in local MB projects. Not a big deal. Looks like Cospend migration script.
Cospend can't know which "real" category should be affected to bills having hardcoded ones... So what do we do when MB tries to edit a bill and sets a hardcoded category? We can just hope it does not happen too much because bills in MB should be updated with new categories. But if a user sets a hardcoded one...
As a memo, here are the combinations:
old MB with old Cospend: yay!
old MB with new Cospend:
problem if MB tells Cospend to set a hardcoded category
duplication of new default and old hardcoded categories (as you witnessed). not so bad
new MB with new Cospend: yay!
new MB with old Cospend: not yay...MB won't display hardcoded categories...unless it's taken care of. It shouldn't be too hard.
MB does not show hardcoded for Cospend projects anymore. If it communicates with an old Cospend (with hardcoded cats), it will still receive hardcoded and store the information but they are no more selectable in edition form.
After a few tests, here is the problematic action:
If user edits any field of a bill which has a hardcoded category in new MB and sync with any Cospend => loose the category. This should not happen too much because in most cases, when updating to new MB, Cospend will already be up to date and provide up to date bills with new categories.
Other than that, things should be fine during the transition.
If you have time and motivation to try latest MB CI build with old and new Cospend, it would be awesome!
Hej @eneiluj - tested with the latest CI-built APK of MB and I couldn't find a flaw, all works as advertised now. I guess people will be relatively quick to update anyway (they should!), so even the corner case you mention will not be grave.