Description
Tomás Cohen Arazi (tcohen)
2019-10-18 18:02:57 UTC
Created attachment 94470 [details] [review] Bug 23843: Add mapping to Koha::Account::Line This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/patrons_accounts.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Created attachment 94471 [details] [review] Bug 23843: Add mapping to Koha::Checkout This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/checkouts.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Created attachment 94472 [details] [review] Bug 23843: Add mapping to Koha::Club::Holds This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/clubs_holds.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Created attachment 94473 [details] [review] Bug 23843: Add mapping to Koha::Hold This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/holds.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Created attachment 94474 [details] [review] Bug 23843: Add mapping to Koha::Library This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/libraries.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Created attachment 94475 [details] [review] Bug 23843: Add mapping to Koha::Patron This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/patrons.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Created attachment 94476 [details] [review] Bug 23843: Add mapping to Koha::Item This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/items.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Created attachment 94477 [details] [review] Bug 23843: Add mapping to Koha::Acquisition::Bookseller This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/acquisitions_vendors.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Created attachment 94478 [details] [review] Bug 23843: Add mapping to Koha::Acquisition::Fund This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/acquisitions_funds.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Created attachment 94496 [details] [review] Bug 23843: (QA follow-up) Fix tests for funds Now that we use ->to_api all the object attributes are returned, so the original tests that didn't follow the FKs would pass, and now they don't. If there is no budget linked to the fund, it will return undef, which is not accepted on the API (though it accepts not returning the attribute). To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/acquisitions_funds.t => SUCCESS: Tests pass! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Comment on attachment 94470 [details] [review] Bug 23843: Add mapping to Koha::Account::Line Review of attachment 94470 [details] [review]: ----------------------------------------------------------------- ::: Koha/Account/Line.pm @@ +399,5 @@ > } > > +=head3 to_api_mapping > + > +This method returns the mapping for representing a Koha::Item object Should be Koha::Account::Line instead of Koha::Item Created attachment 94506 [details] [review] Bug 23843: Add mapping to Koha::Account::Line This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/patrons_accounts.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 94507 [details] [review] Bug 23843: Add mapping to Koha::Checkout This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/checkouts.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 94508 [details] [review] Bug 23843: Add mapping to Koha::Club::Holds This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/clubs_holds.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 94509 [details] [review] Bug 23843: Add mapping to Koha::Hold This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/holds.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 94510 [details] [review] Bug 23843: Add mapping to Koha::Library This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/libraries.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 94511 [details] [review] Bug 23843: Add mapping to Koha::Patron This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/patrons.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 94512 [details] [review] Bug 23843: Add mapping to Koha::Item This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/items.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 94513 [details] [review] Bug 23843: Add mapping to Koha::Acquisition::Bookseller This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/acquisitions_vendors.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 94514 [details] [review] Bug 23843: Add mapping to Koha::Acquisition::Fund This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/acquisitions_funds.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> All works as expected, signing off. If you can fix the comment in "Bug 23843: Add mapping to Koha::Account::Line" I will sign-off that. Created attachment 94587 [details] [review] Bug 23843: Make funds endpoint tests more robust Now that we use ->to_api all the object attributes are returned, so the original tests that didn't follow the FKs would pass, and now they don't. If there is no budget linked to the fund, it will return undef, which is not accepted on the API (though it accepts not returning the attribute). To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/acquisitions_funds.t => SUCCESS: Tests pass! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 94588 [details] [review] Bug 23843: Add mapping to Koha::Account::Line This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/patrons_accounts.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 94589 [details] [review] Bug 23843: Add mapping to Koha::Checkout This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/checkouts.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 94590 [details] [review] Bug 23843: Add mapping to Koha::Club::Holds This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/clubs_holds.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 94591 [details] [review] Bug 23843: Add mapping to Koha::Hold This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/holds.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 94592 [details] [review] Bug 23843: Add mapping to Koha::Library This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/libraries.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 94593 [details] [review] Bug 23843: Add mapping to Koha::Patron This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/patrons.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 94594 [details] [review] Bug 23843: Add mapping to Koha::Item This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/items.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 94595 [details] [review] Bug 23843: Add mapping to Koha::Acquisition::Bookseller This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/acquisitions_vendors.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 94596 [details] [review] Bug 23843: Add mapping to Koha::Acquisition::Fund This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/acquisitions_funds.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Good catch Joonas.. fancy joining the QA team next cycle? In this case, as I'm RM and QA, if your happy and SO I'll convert my own SO as a QA stamp before pushing :) Created attachment 94619 [details] [review] Bug 23843: Make funds endpoint tests more robust Now that we use ->to_api all the object attributes are returned, so the original tests that didn't follow the FKs would pass, and now they don't. If there is no budget linked to the fund, it will return undef, which is not accepted on the API (though it accepts not returning the attribute). To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/acquisitions_funds.t => SUCCESS: Tests pass! Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Created attachment 94620 [details] [review] Bug 23843: Add mapping to Koha::Account::Line This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/patrons_accounts.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Created attachment 94621 [details] [review] Bug 23843: Add mapping to Koha::Checkout This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/checkouts.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Created attachment 94622 [details] [review] Bug 23843: Add mapping to Koha::Club::Holds This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/clubs_holds.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Created attachment 94623 [details] [review] Bug 23843: Add mapping to Koha::Hold This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/holds.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Created attachment 94624 [details] [review] Bug 23843: Add mapping to Koha::Library This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/libraries.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Created attachment 94625 [details] [review] Bug 23843: Add mapping to Koha::Patron This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/patrons.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Created attachment 94626 [details] [review] Bug 23843: Add mapping to Koha::Item This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/items.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Created attachment 94627 [details] [review] Bug 23843: Add mapping to Koha::Acquisition::Bookseller This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/acquisitions_vendors.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Created attachment 94628 [details] [review] Bug 23843: Add mapping to Koha::Acquisition::Fund This patch adds a to_api_mapping method to the class. This in effect enables calling ->to_api on the object. The mapping is borrowed from the API controller. It is not removed from the controller so we are able to verify (through the tests) that there is no behavior change. Once this is pushed we need to implement the counter-wise methods and clean the controllers. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/acquisitions_funds.t => SUCCESS: Tests pass 2. Apply this patch 3. Repeat (1) => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> (In reply to Martin Renvoize from comment #33) > Good catch Joonas.. fancy joining the QA team next cycle? Let me get back to you later on this. > In this case, as I'm RM and QA, if your happy and SO I'll convert my own SO > as a QA stamp before pushing :) I just signed-off it so feel free to use it as QA. Nice work! Pushed to master for 19.11.00 (In reply to Joonas Kylmälä from comment #44) > (In reply to Martin Renvoize from comment #33) > > Good catch Joonas.. fancy joining the QA team next cycle? > > Let me get back to you later on this. Usually it's a good idea to listen to the RM ;) |