Steps to reproduce:
- Create a billing cycle type, e.g. Monthly
- Check the billing_cycle_type_id in the DB. Let's say in this example that it's 1
- Edit the billing cycle type and change something, e.g. the label or whether it's asynchronous or not
- Now, on the overview screen, click the revert link next to the cycle type and confirm reverting it.
- Check in the DB again. The ID will now have increased (because the type got deleted and recreated). If there were products using this billing cycle type, they will now show "None" when edited and have to be reassociated.
I am attaching a patch that fixes this. It's doubtful that my fix is the best way to accomplish this, but it does work. Hopefully someone can think of a better way.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 2876266_6_fix_revert.patch | 4.06 KB | wizonesolutions |
Comments
Comment #2
wizonesolutionsComment #3
wizonesolutionsMIs-patch, fixing.
Comment #4
wizonesolutionsComment #5
wizonesolutionsPrevious patch is still weird (needs -p2) — here is one that is more normal (probably only needs -p1).
Comment #6
wizonesolutionsWhoops! I subclassed the wrong class. This patch is fixed.