[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-08-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Blocks|17006   |


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006
[Bug 17006] Add route to change patron's password
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-05-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Nick Clemens  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 CC||n...@bywatersolutions.com
 Status|Pushed to Master|RESOLVED

--- Comment #37 from Nick Clemens  ---
Enhancement, not backported for 17.11.x

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-05-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784
Bug 19784 depends on bug 16330, which changed state.

Bug 16330 Summary: Add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330

   What|Removed |Added

 Status|Pushed to Master|RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-03-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Jonathan Druart  changed:

   What|Removed |Added

 Status|Passed QA   |Pushed to Master

--- Comment #36 from Jonathan Druart  
---
Pushed to master for 18.05, thanks to everybody involved!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-02-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

--- Comment #34 from Kyle M Hall  ---
Created attachment 72172
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72172&action=edit
Bug 19784: Remove reference to 'borrowernumber' param from other endpoints

This patch removes the $ref occurences for borrowernumber in not
patron-specific endpoints. 'borrowernumber' is still used on them, but as a
hardcoded parameter. The param rename will happen on a separate bug for
each endpoint.

Signed-off-by: Josef Moravec 

Signed-off-by: Nick Clemens 

Signed-off-by: Kyle M Hall 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-02-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

--- Comment #35 from Kyle M Hall  ---
Created attachment 72173
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72173&action=edit
Bug 19784: Adapt /v1/patrons to new naming guidelines

This patch introduces two functions to the patrons endpoint:
- _to_api
- _to_model

This are in charge of field mappings in order to comply with the
guidelines.

Koha::REST::V1:Auth is adjusted to handle 'patron_id' as well. 'borrowernumber'
handling is kept until the existing endpoints get updated.

To test:
- Apply the patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/*.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Josef Moravec 

Signed-off-by: Nick Clemens 

Signed-off-by: Kyle M Hall 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-02-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Kyle M Hall  changed:

   What|Removed |Added

  Attachment #72026|0   |1
is obsolete||
  Attachment #72027|0   |1
is obsolete||
  Attachment #72028|0   |1
is obsolete||

--- Comment #33 from Kyle M Hall  ---
Created attachment 72171
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72171&action=edit
Bug 19784: Unit tests for /api/v1/patrons

This patch adapts the existing endpoint's tests so they expect:
- 'patron_id' for 'borrowernumber'
- 'library_id' for 'branchcode'
- 'category_id' for 'categorycode'

In the process, I tried to make the tests more robust, by creating random
data that gets deleted to make sure our tests cases can't have false
positives.

Independent subtests are wrapped inside transactions to avoid
eventual interference.

To test:
- Apply the patch
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: The api doesn't implement the expected behaviour and attributes
for endpoint responses

Signed-off-by: Josef Moravec 

Signed-off-by: Nick Clemens 

Signed-off-by: Kyle M Hall 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-02-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Kyle M Hall  changed:

   What|Removed |Added

 Status|Signed Off  |Passed QA

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-02-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Nick Clemens  changed:

   What|Removed |Added

  Attachment #71967|0   |1
is obsolete||
  Attachment #71968|0   |1
is obsolete||
  Attachment #71969|0   |1
is obsolete||

--- Comment #30 from Nick Clemens  ---
Created attachment 72026
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72026&action=edit
Bug 19784: Unit tests for /api/v1/patrons

This patch adapts the existing endpoint's tests so they expect:
- 'patron_id' for 'borrowernumber'
- 'library_id' for 'branchcode'
- 'category_id' for 'categorycode'

In the process, I tried to make the tests more robust, by creating random
data that gets deleted to make sure our tests cases can't have false
positives.

Independent subtests are wrapped inside transactions to avoid
eventual interference.

To test:
- Apply the patch
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: The api doesn't implement the expected behaviour and attributes
for endpoint responses

Signed-off-by: Josef Moravec 

Signed-off-by: Nick Clemens 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-02-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

--- Comment #32 from Nick Clemens  ---
Created attachment 72028
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72028&action=edit
Bug 19784: Adapt /v1/patrons to new naming guidelines

This patch introduces two functions to the patrons endpoint:
- _to_api
- _to_model

This are in charge of field mappings in order to comply with the
guidelines.

Koha::REST::V1:Auth is adjusted to handle 'patron_id' as well. 'borrowernumber'
handling is kept until the existing endpoints get updated.

To test:
- Apply the patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/*.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Josef Moravec 

Signed-off-by: Nick Clemens 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-02-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

--- Comment #31 from Nick Clemens  ---
Created attachment 72027
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72027&action=edit
Bug 19784: Remove reference to 'borrowernumber' param from other endpoints

This patch removes the $ref occurences for borrowernumber in not
patron-specific endpoints. 'borrowernumber' is still used on them, but as a
hardcoded parameter. The param rename will happen on a separate bug for
each endpoint.

Signed-off-by: Josef Moravec 

Signed-off-by: Nick Clemens 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-02-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

--- Comment #29 from Josef Moravec  ---
Created attachment 71969
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71969&action=edit
Bug 19784: Adapt /v1/patrons to new naming guidelines

This patch introduces two functions to the patrons endpoint:
- _to_api
- _to_model

This are in charge of field mappings in order to comply with the
guidelines.

Koha::REST::V1:Auth is adjusted to handle 'patron_id' as well. 'borrowernumber'
handling is kept until the existing endpoints get updated.

To test:
- Apply the patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/*.t
=> SUCCESS: Tests pass!
- Sign off :-D

Signed-off-by: Josef Moravec 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-02-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Josef Moravec  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-02-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Josef Moravec  changed:

   What|Removed |Added

  Attachment #71959|0   |1
is obsolete||
  Attachment #71960|0   |1
is obsolete||
  Attachment #71961|0   |1
is obsolete||

--- Comment #27 from Josef Moravec  ---
Created attachment 71967
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71967&action=edit
Bug 19784: Unit tests for /api/v1/patrons

This patch adapts the existing endpoint's tests so they expect:
- 'patron_id' for 'borrowernumber'
- 'library_id' for 'branchcode'
- 'category_id' for 'categorycode'

In the process, I tried to make the tests more robust, by creating random
data that gets deleted to make sure our tests cases can't have false
positives.

Independent subtests are wrapped inside transactions to avoid
eventual interference.

To test:
- Apply the patch
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: The api doesn't implement the expected behaviour and attributes
for endpoint responses

Signed-off-by: Josef Moravec 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-02-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

--- Comment #28 from Josef Moravec  ---
Created attachment 71968
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71968&action=edit
Bug 19784: Remove reference to 'borrowernumber' param from other endpoints

This patch removes the $ref occurences for borrowernumber in not
patron-specific endpoints. 'borrowernumber' is still used on them, but as a
hardcoded parameter. The param rename will happen on a separate bug for
each endpoint.

Signed-off-by: Josef Moravec 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-02-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #71770|0   |1
is obsolete||

--- Comment #26 from Tomás Cohen Arazi  ---
Created attachment 71961
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71961&action=edit
Bug 19784: Adapt /v1/patrons to new naming guidelines

This patch introduces two functions to the patrons endpoint:
- _to_api
- _to_model

This are in charge of field mappings in order to comply with the
guidelines.

Koha::REST::V1:Auth is adjusted to handle 'patron_id' as well. 'borrowernumber'
handling is kept until the existing endpoints get updated.

To test:
- Apply the patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/*.t
=> SUCCESS: Tests pass!
- Sign off :-D

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-02-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #71769|0   |1
is obsolete||

--- Comment #25 from Tomás Cohen Arazi  ---
Created attachment 71960
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71960&action=edit
Bug 19784: Remove reference to 'borrowernumber' param from other endpoints

This patch removes the $ref occurences for borrowernumber in not
patron-specific endpoints. 'borrowernumber' is still used on them, but as a
hardcoded parameter. The param rename will happen on a separate bug for
each endpoint.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-02-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #71768|0   |1
is obsolete||

--- Comment #24 from Tomás Cohen Arazi  ---
Created attachment 71959
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71959&action=edit
Bug 19784: Unit tests for /api/v1/patrons

This patch adapts the existing endpoint's tests so they expect:
- 'patron_id' for 'borrowernumber'
- 'library_id' for 'branchcode'
- 'category_id' for 'categorycode'

In the process, I tried to make the tests more robust, by creating random
data that gets deleted to make sure our tests cases can't have false
positives.

Independent subtests are wrapped inside transactions to avoid
eventual interference.

To test:
- Apply the patch
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: The api doesn't implement the expected behaviour and attributes
for endpoint responses

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-02-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Needs Signoff

--- Comment #23 from Tomás Cohen Arazi  ---
Rebased on top of (rebased) bug 16330.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-02-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #70610|0   |1
is obsolete||

--- Comment #21 from Tomás Cohen Arazi  ---
Created attachment 71769
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71769&action=edit
Bug 19784: Remove reference to 'borrowernumber' param from other endpoints

This patch removes the $ref occurences for borrowernumber in not
patron-specific endpoints. 'borrowernumber' is still used on them, but as a
hardcoded parameter. The param rename will happen on a separate bug for
each endpoint.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-02-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #70612|0   |1
is obsolete||

--- Comment #22 from Tomás Cohen Arazi  ---
Created attachment 71770
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71770&action=edit
Bug 19784: Adapt /v1/patrons to new naming guidelines

This patch introduces two functions to the patrons endpoint:
- _to_api
- _to_model

This are in charge of field mappings in order to comply with the
guidelines.

Koha::REST::V1:Auth is adjusted to handle 'patron_id' as well. 'borrowernumber'
handling is kept until the existing endpoints get updated.

To test:
- Apply the patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/*.t
=> SUCCESS: Tests pass!
- Sign off :-D

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-02-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #70609|0   |1
is obsolete||

--- Comment #20 from Tomás Cohen Arazi  ---
Created attachment 71768
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=71768&action=edit
Bug 19784: Unit tests for /api/v1/patrons

This patch adapts the existing endpoint's tests so they expect:
- 'patron_id' for 'borrowernumber'
- 'library_id' for 'branchcode'
- 'category_id' for 'categorycode'

In the process, I tried to make the tests more robust, by creating random
data that gets deleted to make sure our tests cases can't have false
positives.

Independent subtests are wrapped inside transactions to avoid
eventual interference.

To test:
- Apply the patch
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: The api doesn't implement the expected behaviour and attributes
for endpoint responses

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-02-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|Needs Signoff   |Patch doesn't apply

--- Comment #19 from Tomás Cohen Arazi  ---
Patches need refactoring after recent changes in the codebase.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-02-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Blocks||17006


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17006
[Bug 17006] REST API: add route to change patron's password
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-01-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

URL||https://wiki.koha-community
   ||.org/wiki/Patrons_endpoint_
   ||RFC

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-01-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

--- Comment #18 from Tomás Cohen Arazi  ---
My last submission implements the changes voted with the RFC as a basis [1]

Tests should pass, and the changes to the patrons.json file should make sense
in terms of the RFC.

I removed the dependency on objects.search as the query parameters used in this
endpoint require a more fine grained approach as you can see on the patch.

Enjoy!

[1] https://wiki.koha-community.org/wiki/Patrons_endpoint_RFC

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-01-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #70611|0   |1
is obsolete||

--- Comment #17 from Tomás Cohen Arazi  ---
Created attachment 70612
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70612&action=edit
Bug 19784: Adapt /v1/patrons to new naming guidelines

This patch introduces two functions to the patrons endpoint:
- _to_api
- _to_model

This are in charge of field mappings in order to comply with the
guidelines.

Koha::REST::V1:Auth is adjusted to handle 'patron_id' as well.

To test:
- Apply the patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/*.t
=> SUCCESS: Tests pass!
- Sign off :-D

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-01-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

   Patch complexity|--- |Medium patch

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-01-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|ASSIGNED|Needs Signoff
 Depends on|19686   |


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19686
[Bug 19686] objects.search helper needs a to_model param
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-01-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

--- Comment #15 from Tomás Cohen Arazi  ---
Created attachment 70610
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70610&action=edit
Bug 19784: Remove reference to 'borrowernumber' param from other endpoints

This patch removes the $ref occurences for borrowernumber in not
patron-specific endpoints. 'borrowernumber' is still used on them, but as a
hardcoded parameter. The param rename will happen on a separate bug for
each endpoint.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-01-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

--- Comment #16 from Tomás Cohen Arazi  ---
Created attachment 70611
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70611&action=edit
Bug 19784: Adapt /v1/patrons to new naming guidelines

This patch introduces two functions to the patrons endpoint:
- _to_api
- _to_model

This are in charge of field mappings in order to comply with the
guidelines.

Koha::REST::V1:Auth is adjusted to handle 'patron_id' as well.

To test:
- Apply the patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass!
- Sign off :-D

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-01-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

--- Comment #14 from Tomás Cohen Arazi  ---
Created attachment 70609
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=70609&action=edit
Bug 19784: Unit tests for /api/v1/patrons

This patch adapts the existing endpoint's tests so they expect:
- 'patron_id' for 'borrowernumber'
- 'library_id' for 'branchcode'
- 'category_id' for 'categorycode'

In the process, I tried to make the tests more robust, by creating random
data that gets deleted to make sure our tests cases can't have false
positives.

Independent subtests are wrapped inside transactions to avoid
eventual interference.

To test:
- Apply the patch
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: The api doesn't implement the expected behaviour and attributes
for endpoint responses

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-01-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #69755|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-01-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #69754|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2018-01-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #69753|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|Patch doesn't apply |ASSIGNED

--- Comment #13 from Tomás Cohen Arazi  ---
16330 got big changes. This is not supposed to apply nor up to date with the
voted RFC. I'll fix it today.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

--- Comment #12 from Katrin Fischer  ---
Same for me, I have applied the dependencies 16330 and 19686 (both apply
cleanly) - but this one gives me a lot of trouble.

I feel like we should wait for this patch to QA the dependencies - probably
needs an update now too with the discussion at the last meeting / RFC on the
wiki?

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 16330: Add routes to add, update and delete patrons
Using index info to reconstruct a base tree...
M   Koha/Exceptions.pm
M   Koha/Patron.pm
A   Koha/REST/V1/Patron.pm
M   api/v1/swagger/definitions/patron.json
M   api/v1/swagger/paths/patrons.json
M   t/db_dependent/Koha/Patrons.t
M   t/db_dependent/api/v1/patrons.t
Falling back to patching base and 3-way merge...
Auto-merging t/db_dependent/api/v1/patrons.t
CONFLICT (content): Merge conflict in t/db_dependent/api/v1/patrons.t
Auto-merging t/db_dependent/Koha/Patrons.t
CONFLICT (content): Merge conflict in t/db_dependent/Koha/Patrons.t
Auto-merging api/v1/swagger/paths/patrons.json
CONFLICT (content): Merge conflict in api/v1/swagger/paths/patrons.json
Auto-merging Koha/SMS/Provider.pm
CONFLICT (content): Merge conflict in Koha/SMS/Provider.pm
Auto-merging Koha/Patron.pm
CONFLICT (content): Merge conflict in Koha/Patron.pm
Failed to merge in the changes.
Patch failed at 0001 Bug 16330: Add routes to add, update and delete patrons
The copy of the patch that failed is found in:
   /home/vagrant/kohaclone/.git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in
/tmp/Bug-16330-Add-routes-to-add-update-and-delete-patr-hbLRSU.patch

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

David Bourgault  changed:

   What|Removed |Added

 Status|Needs Signoff   |Patch doesn't apply
 CC||david.bourga...@inlibro.com

--- Comment #11 from David Bourgault  ---
Patch does not apply for me on clean master.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Dilan Johnpullé  changed:

   What|Removed |Added

 CC||di...@calyx.net.au

--- Comment #10 from Dilan Johnpullé  ---
Attempted to sign off in devbox but test failed in kshell with the following:

t/db_dependent/api/v1/patrons.t .. 1/5 DBD::mysql::st execute failed: Cannot
add or update a child row: a foreign key constraint fails
(`koha_kohadev`.`account_offsets`, CONSTRAINT `account_offsets_ibfk_t` FOREIGN
KEY (`type`) REFERENCES `account_offset_types` (`type`) ON DELETE CASCADE ON
UPDATE CASCADE) [for Statement "INSERT INTO `account_offsets` ( `amount`,
`debit_id`, `type`) VALUES ( ?, ?, ? )" with ParamValues:
0=584140512722723000.00, 1='1', 2='Manual Debit'] at
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1832.

#   Failed test 'Patron created successfully'
#   at t/db_dependent/api/v1/patrons.t line 210.
#  got: '500'
# expected: '201'

#   Failed test 'got a patron_id'
#   at t/db_dependent/api/v1/patrons.t line 210.

#   Failed test 'exact match for JSON Pointer "/cardnumber"'
#   at t/db_dependent/api/v1/patrons.t line 210.
#  got: undef
# expected: 'av0WRHT1xJdZ1JDtAZ2'

#   Failed test 'exact match for JSON Pointer "/surname"'
#   at t/db_dependent/api/v1/patrons.t line 210.
#  got: undef
# expected: 'iC24_uBTgv'

#   Failed test 'exact match for JSON Pointer "/firstname"'
#   at t/db_dependent/api/v1/patrons.t line 210.
#  got: undef
# expected: 'sIxTOBcMXz'
# Looks like you failed 5 tests of 18.

#   Failed test 'librarian access tests'
#   at t/db_dependent/api/v1/patrons.t line 224.
# Looks like you failed 1 test of 2.
t/db_dependent/api/v1/patrons.t .. 3/5 
#   Failed test 'add() tests'
#   at t/db_dependent/api/v1/patrons.t line 225.
t/db_dependent/api/v1/patrons.t .. 5/5 # Looks like you failed 1 test of 5.
t/db_dependent/api/v1/patrons.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/5 subtests 

Test Summary Report
---
t/db_dependent/api/v1/patrons.t (Wstat: 256 Tests: 5 Failed: 1)
  Failed test:  3
  Non-zero exit status: 1
Files=1, Tests=5,  5 wallclock secs ( 0.03 usr  0.02 sys +  3.20 cusr  0.86
csys =  4.11 CPU)
Result: FAIL

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

--- Comment #9 from Tomás Cohen Arazi  ---
Created attachment 69755
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69755&action=edit
Bug 19784: Adapt /v1/patrons to new naming guidelines

This patch introduces two functions to the patrons endpoint:
- _to_api
- _to_model

This are in charge of field mappings in order to comply with the
guidelines.

Koha::REST::V1:Auth is adjusted to handle 'patron_id' as well.

To test:
- Apply the patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass!
- Sign off :-D

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

--- Comment #7 from Tomás Cohen Arazi  ---
Created attachment 69753
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69753&action=edit
Bug 19784: Unit tests for /api/v1/patrons

This patch adapts the existing endpoint's tests so they expect:
- 'patron_id' for 'borrowernumber'
- 'library_id' for 'branchcode'
- 'category_id' for 'categorycode'

In the process, I tried to make the tests more robust, by creating random
data that gets deleted to make sure our tests cases can't have false
positives.

Independent subtests are wrapped inside transactions to avoid
eventual interference.

To test:
- Apply the patch
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: The api doesn't implement the expected behaviour and attributes
for endpoint responses

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

--- Comment #8 from Tomás Cohen Arazi  ---
Created attachment 69754
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69754&action=edit
Bug 19784: Remove reference to 'borrowernumber' param from other endpoints

This patch removes the $ref occurences for borrowernumber in not
patron-specific endpoints. 'borrowernumber' is still used on them, but as a
hardcoded parameter. The param rename will happen on a separate bug for
each endpoint.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #69645|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #69643|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

  Attachment #69644|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

 CC||tomasco...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Depends on||19686

--- Comment #6 from Tomás Cohen Arazi  ---
Dominic, I'm sorry. I forgot to add one dependency.


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19686
[Bug 19686] objects.search helper needs a to_model param
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

--- Comment #5 from Tomás Cohen Arazi  ---
(In reply to Dominic Pichette from comment #4)
> Applying: Bug 19784: Unit tests for /api/v1/patrons
> fatal: sha1 information is lacking or useless
> (t/db_dependent/api/v1/patrons.t).
> error: could not build fake ancestor
> Patch failed at 0001 Bug 19784: Unit tests for /api/v1/patrons

Please try on top of my 'pagination' branch on github, plus 16330. Dependencies
are not easy to apply. It applies cleanly.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Dominic Pichette  changed:

   What|Removed |Added

 CC||dominic.piche...@inlibro.co
   ||m

--- Comment #4 from Dominic Pichette  ---
Applying: Bug 19784: Unit tests for /api/v1/patrons
fatal: sha1 information is lacking or useless
(t/db_dependent/api/v1/patrons.t).
error: could not build fake ancestor
Patch failed at 0001 Bug 19784: Unit tests for /api/v1/patrons

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|NEW |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

--- Comment #1 from Tomás Cohen Arazi  ---
Created attachment 69643
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69643&action=edit
Bug 19784: Unit tests for /api/v1/patrons

This patch adapts the existing endpoint's tests so they expect:
- 'patron_id' for 'borrowernumber'
- 'library_id' for 'branchcode'
- 'category_id' for 'categorycode'

In the process, I tried to make the tests more robust, by creating random
data that gets deleted to make sure our tests cases can't have false
positives.

Independent subtests are wrapped inside transactions to avoid
eventual interference.

To test:
- Apply the patch
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: The api doesn't implement the expected behaviour and attributes
for endpoint responses

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

--- Comment #2 from Tomás Cohen Arazi  ---
Created attachment 69644
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69644&action=edit
Bug 19784: Remove reference to 'borrowernumber' param from other endpoints

This patch removes the $ref occurences for borrowernumber in not
patron-specific endpoints. 'borrowernumber' is still used on them, but as a
hardcoded parameter. The param rename will happen on a separate bug for
each endpoint.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

--- Comment #3 from Tomás Cohen Arazi  ---
Created attachment 69645
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69645&action=edit
Bug 19784: Adapt /v1/patrons to new naming guidelines

This patch introduces two functions to the patrons endpoint:
- _to_api
- _to_model

This are in charge of field mappings in order to comply with the
guidelines.

Koha::REST::V1:Auth is adjusted to handle 'patron_id' as well.

To test:
- Apply the patches
- Run:
  $ kshell
 k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCESS: Tests pass!
- Sign off :-D

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

 CC||b...@calyx.net.au,
   ||katrin.fisc...@bsz-bw.de

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Depends on|19774   |16330
 Blocks||19774


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16330
[Bug 16330] REST API: add routes to add, update and delete patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19774
[Bug 19774] Adapt existing endpoints to new naming guidelines OMNIBUS
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

   Assignee|koha-b...@lists.koha-commun |tomasco...@gmail.com
   |ity.org |
  Change sponsored?|--- |Sponsored

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

[Koha-bugs] [Bug 19784] Adapt /v1/patrons to new naming guidelines

2017-12-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19784

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Depends on||19774


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19774
[Bug 19774] Adapt existing endpoints to new naming guidelines OMNIBUS
-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/