Description
Andrew Fuerste-Henry
2020-05-06 13:58:16 UTC
If I check in a lost item on 19.11, the accountline for the lost fee shows debit_type_code LOST with status RETURNED. The accountline that gets created for the credit -- what would have been accounttype 'CR' in 19.05 - has credit_type_code "LOST_RETURN." I think bug 22563 got the value wrong when updating old credits. Martin, I think you would be probably the best to have a look here - I am a little lost with the new status still. You are completely right :(.. Working on a fix now. Created attachment 104678 [details] [review] Bug 25389: Correct original DB update for bug 22563 Created attachment 104679 [details] [review] Bug 25389: Correct stray cases of LOST_RETURNED The original DB update for bug 22563 incorrectly mapped CR to LOST_RETURNED as aposed to LOST_RETURN. This patch catches such cases and updates them in the update for bug 23805 Created attachment 104680 [details] [review] Bug 25389: Catch LOST_RETURNED in DB update 19.12.00.021 An errant update from bug 22563 could lead to cases of LOST_RETURNED as aposed to LOST_RETURN as an account_credit_type. This patch adds code to deal with those cases to the update for bug 24592 Created attachment 104681 [details] [review] Bug 25389: Catch errant cases of LOST_RETURNED For upgrades taking place after the fix for the update in bug 24592 was pushed, we need to catch any last remaining error cases and correct them. It may be safer to skip the first patch entirely.. I'm open to peoples opinions there. If I read this right: The first two patches fix the upgrade for site that have not yet upgraded to 19.11 The last two patches will fix sites going to 20.05 We will still need a patch to fix sites that got the bad upgrade in 19.11? The last patch moves to LOST_FOUND, but that isn't introduced before 20.05 (bug 24592) So, each patch will need some careful backporting to their various branches to catch in the right place. This set was for master.. I suppose to be safe I could create a corresponding set that applies cleanly to 19.11.x.. you are correct.. the final patch would need modifying to LOST_RETURN for that case. Created attachment 104755 [details] [review] Bug 25389: Correct original DB update for bug 22563 Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 104756 [details] [review] Bug 25389: Correct stray cases of LOST_RETURNED The original DB update for bug 22563 incorrectly mapped CR to LOST_RETURNED as aposed to LOST_RETURN. This patch catches such cases and updates them in the update for bug 23805 Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 104757 [details] [review] Bug 25389: Catch LOST_RETURNED in DB update 19.12.00.021 An errant update from bug 22563 could lead to cases of LOST_RETURNED as aposed to LOST_RETURN as an account_credit_type. This patch adds code to deal with those cases to the update for bug 24592 Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 104758 [details] [review] Bug 25389: Catch errant cases of LOST_RETURNED For upgrades taking place after the fix for the update in bug 24592 was pushed, we need to catch any last remaining error cases and correct them. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 104775 [details] [review] Bug 25389: Correct original DB update for bug 22563 Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 104776 [details] [review] Bug 25389: Correct stray cases of LOST_RETURNED The original DB update for bug 22563 incorrectly mapped CR to LOST_RETURNED as aposed to LOST_RETURN. This patch catches such cases and updates them in the update for bug 23805 Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 104777 [details] [review] Bug 25389: Catch LOST_RETURNED in DB update 19.12.00.021 An errant update from bug 22563 could lead to cases of LOST_RETURNED as aposed to LOST_RETURN as an account_credit_type. This patch adds code to deal with those cases to the update for bug 24592 Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 104778 [details] [review] Bug 25389: Catch errant cases of LOST_RETURNED For upgrades taking place after the fix for the update in bug 24592 was pushed, we need to catch any last remaining error cases and correct them. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Nice work everyone! Pushed to master for 20.05 See bug 25478 for a pre-ported version for easy application to the 19.11.x branch. |