There are two primary issues I've identified with requesting line items for fees via SIP: 1) The end boundary is incorrect. For example, if send a request with a BP ( starting item) of 1, and a BQ (end item) of 1, I should get just the first item. Instead I will get two items 2) Our SIP server does not check bounds. For example, if I have 3 fines, but I send a BP of 1 and a BQ of 5, I will get back 5 AVs, two of them being "empty" because the patron only has 3 accountlines!
Created attachment 114338 [details] [review] Bug 27204: Add unit tests for fine_items
Created attachment 114339 [details] [review] Bug 27204: Fix end boundary index, never return results for non-existant accountlines There are two primary issues I've identified with requesting line items for fees via SIP: 1) The end boundary is incorrect. For example, if send a request with a BP ( starting item) of 1, and a BQ (end item) of 1, I should get just the first item. Instead I will get two items 2) Our SIP server does not check bounds. For example, if I have 3 fines, but I send a BP of 1 and a BQ of 5, I will get back 5 AVs, two of them being "empty" because the patron only has 3 accountlines! Test Plan: 1) Apply the unit test patch 2) prove t/db_dependent/SIP/Patron.t 3) Note the failures 4) Apply the second patch 5) prove t/db_dependent/SIP/Patron.t 6) All tests should pass!
Created attachment 115824 [details] [review] Bug 27204: Add unit tests for fine_items Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 115825 [details] [review] Bug 27204: Fix end boundary index, never return results for non-existant accountlines There are two primary issues I've identified with requesting line items for fees via SIP: 1) The end boundary is incorrect. For example, if send a request with a BP ( starting item) of 1, and a BQ (end item) of 1, I should get just the first item. Instead I will get two items 2) Our SIP server does not check bounds. For example, if I have 3 fines, but I send a BP of 1 and a BQ of 5, I will get back 5 AVs, two of them being "empty" because the patron only has 3 accountlines! Test Plan: 1) Apply the unit test patch 2) prove t/db_dependent/SIP/Patron.t 3) Note the failures 4) Apply the second patch 5) prove t/db_dependent/SIP/Patron.t 6) All tests should pass! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Nice catch, Signing off
Created attachment 116119 [details] [review] Bug 27204: Add unit tests for fine_items Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 116120 [details] [review] Bug 27204: Fix end boundary index, never return results for non-existant accountlines There are two primary issues I've identified with requesting line items for fees via SIP: 1) The end boundary is incorrect. For example, if send a request with a BP ( starting item) of 1, and a BQ (end item) of 1, I should get just the first item. Instead I will get two items 2) Our SIP server does not check bounds. For example, if I have 3 fines, but I send a BP of 1 and a BQ of 5, I will get back 5 AVs, two of them being "empty" because the patron only has 3 accountlines! Test Plan: 1) Apply the unit test patch 2) prove t/db_dependent/SIP/Patron.t 3) Note the failures 4) Apply the second patch 5) prove t/db_dependent/SIP/Patron.t 6) All tests should pass! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Test makes sense and passes tests. For functionality testing I trust Kyle and Martin here, they are the SIP experts.
Pushed to master for 21.05, thanks to everybody involved!
Pushed to 20.11.x for 20.11.03
Pushed to 20.05.x for 20.05.09
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.