Summary: | POST /patrons/:patron_id/account/credits return value wrong | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi <tomascohen> |
Component: | REST API | Assignee: | Tomás Cohen Arazi <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, jonathan.druart, martin.renvoize |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28370 | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.05.00
|
|
Bug Depends on: | |||
Bug Blocks: | 28370 | ||
Attachments: |
Bug 28424: Regression tests
Bug 28424: Fix patron credits route (POST) Bug 28424: (28370 follow-up) Fix response definition Bug 28424: (follow-up) Do not create account lines manually Bug 28424: Regression tests Bug 28424: Fix patron credits route (POST) Bug 28424: (28370 follow-up) Fix response definition Bug 28424: (follow-up) Do not create account lines manually |
Description
Tomás Cohen Arazi
2021-05-21 20:32:35 UTC
Created attachment 121292 [details] [review] Bug 28424: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 121293 [details] [review] Bug 28424: Fix patron credits route (POST) This patch makes the route follow the coding guidelines and thus: - Return the generated object - Use the status code 201 for the response To test: 1. Apply the tests patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/patrons_accounts.t => FAIL: Tests fail. The reponse body and status is incorrect 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 121294 [details] [review] Bug 28424: (28370 follow-up) Fix response definition Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 121295 [details] [review] Bug 28424: (follow-up) Do not create account lines manually Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 121304 [details] [review] Bug 28424: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Created attachment 121305 [details] [review] Bug 28424: Fix patron credits route (POST) This patch makes the route follow the coding guidelines and thus: - Return the generated object - Use the status code 201 for the response To test: 1. Apply the tests patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/patrons_accounts.t => FAIL: Tests fail. The reponse body and status is incorrect 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Created attachment 121306 [details] [review] Bug 28424: (28370 follow-up) Fix response definition Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Created attachment 121307 [details] [review] Bug 28424: (follow-up) Do not create account lines manually Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> Pushed to master for 21.05, thanks to everybody involved! Does not apply on 20.11.x for t/db_dependent/api/v1/patrons_accounts.t Because of Bug 27587 it seems. |