[Bug 23858] New: Vendors endpoint not setting the Location header
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 Bug ID: 23858 Summary: Vendors endpoint not setting the Location header Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: REST api Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com It is not being set when creating a new vendor. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |minor Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | URL| |https://wiki.koha-community | |.org/wiki/Coding_Guidelines | |_-_API#SWAGGER3.4.1_POST -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 94480 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94480&action=edit Bug 23858: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 94481 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94481&action=edit Bug 23858: Make POST add the Location header on vendors endpoint According to the coding guidelines, this endpoint should be adding the Location header on POST actions. To test: 1. Apply the tests patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/acquisition_vendors.t => FAIL: Tests fail! 3. Apply this patch 4. Repeat (1) => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 94482 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94482&action=edit Bug 23858: (follow-up) Return code fix Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |23843 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23843 [Bug 23843] Make existing endpoints use Koha::Object(s)->to_api -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 --- Comment #4 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Comment on attachment 94481 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94481 Bug 23858: Make POST add the Location header on vendors endpoint Review of attachment 94481: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=23858&attachment=94481) ----------------------------------------------------------------- In the commit message "prove t/db_dependent/api/v1/acquisition_vendors.t" should be "prove t/db_dependent/api/v1/acquisitions_vendors.t" -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |joonas.kylmala@helsinki.fi Status|Needs Signoff |Failed QA --- Comment #5 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Instead of making a follow-up to your own commit please squash the 201 regression tests to the first patch "Bug 23858: Regression tests" and make the fix separate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Joonas Kylmälä from comment #5)
Instead of making a follow-up to your own commit please squash the 201 regression tests to the first patch "Bug 23858: Regression tests" and make the fix separate
Well, it is not a 'fix'. I actually wanted to honor the rule that refactoring patches should be separate from those introducing the behavior change so we can keep track of things better. The refactoring could have happened on a separate bug I reckon. Yesterday I've finished the patrons one as well. Submitting today -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 --- Comment #7 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Tomás Cohen Arazi from comment #6)
(In reply to Joonas Kylmälä from comment #5)
Instead of making a follow-up to your own commit please squash the 201 regression tests to the first patch "Bug 23858: Regression tests" and make the fix separate
Well, it is not a 'fix'. I actually wanted to honor the rule that refactoring patches should be separate from those introducing the behavior change so we can keep track of things better. The refactoring could have happened on a separate bug I reckon.
Yesterday I've finished the patrons one as well. Submitting today
Oh, I misread the patch earlier, I thought it was adding that 201 check as new test but I now see it tested it earlier already for 200 return code. Sorry for this confusion, will sign-off this soon. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply --- Comment #8 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- When trying to apply the patch I get: Applying: Bug 23858: Make POST add the Location header on vendors endpoint error: sha1 information is lacking or useless (Koha/REST/V1/Acquisitions/Vendors.pm). Can you resubmit rebased version? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff --- Comment #9 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Sorry, I forgot that this was depending on the other bug... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94480|0 |1 is obsolete| | --- Comment #10 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 94534 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94534&action=edit Bug 23858: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94481|0 |1 is obsolete| | --- Comment #11 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 94535 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94535&action=edit Bug 23858: Make POST add the Location header on vendors endpoint According to the coding guidelines, this endpoint should be adding the Location header on POST actions. To test: 1. Apply the tests patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/acquisition_vendors.t => FAIL: Tests fail! 3. Apply this patch 4. Repeat (1) => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94482|0 |1 is obsolete| | --- Comment #12 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- Created attachment 94536 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94536&action=edit Bug 23858: (follow-up) Return code fix Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #13 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Joonas Kylmälä from comment #4)
Comment on attachment 94481 [details] [review] Bug 23858: Make POST add the Location header on vendors endpoint
Review of attachment 94481 [details] [review]: -----------------------------------------------------------------
In the commit message "prove t/db_dependent/api/v1/acquisition_vendors.t" should be "prove t/db_dependent/api/v1/acquisitions_vendors.t"
This was just a minor nitpick and I was easily able to figure it out so I will let it slide this time. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94534|0 |1 is obsolete| | --- Comment #14 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 94796 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94796&action=edit Bug 23858: Regression tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94535|0 |1 is obsolete| | --- Comment #15 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 94797 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94797&action=edit Bug 23858: Make POST add the Location header on vendors endpoint According to the coding guidelines, this endpoint should be adding the Location header on POST actions. To test: 1. Apply the tests patch 2. Run: $ kshell k$ prove t/db_dependent/api/v1/acquisitions_vendors.t => FAIL: Tests fail! 3. Apply this patch 4. Repeat (1) => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #94536|0 |1 is obsolete| | --- Comment #16 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 94798 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=94798&action=edit Bug 23858: (follow-up) Return code fix Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |19.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23858 --- Comment #17 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Nice work! Pushed to master for 19.11.00 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org