[Koha-bugs] [Bug 13895] Add API routes for checkouts retrieval and renewal

2017-06-16 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Marcel de Rooy  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA
 CC||m.de.r...@rijksmuseum.nl

--- Comment #50 from Marcel de Rooy  ---
Could not find "../x-primitives.json#/branchcode"
(../x-primitives.json#/branchcode). Typo in schema
"api/v1/swagger/definitions/checkout.json"? at JSON/Validator.pm line 229.
# Looks like your test exited with 255 before it could output anything.

This branchcode is not in api/v1/swagger/x-primitives.json ??

And a small bonus from qa tools:
 FAIL   t/db_dependent/api/v1/checkouts.t
   FAIL   forbidden patterns
forbidden pattern: tab char (line 190)

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2017-05-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Mirko Tietgen  changed:

   What|Removed |Added

 Blocks||18407


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18407
[Bug 18407] REST API: Include renewability information on checkouts
-- 
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 13895] Add API routes for checkouts retrieval and renewal

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

Jiri Kozlovsky  changed:

   What|Removed |Added

 CC||blac...@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 13895] Add API routes for checkouts retrieval and renewal

2016-12-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #49 from Lari Taskula  ---
(In reply to Lari Taskula from comment #48)
> Created attachment 58387 [details] [review]
This patch only changes Koha::Issues to Koha::Checkouts.

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-12-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Lari Taskula  changed:

   What|Removed |Added

  Attachment #56506|0   |1
is obsolete||

--- Comment #48 from Lari Taskula  ---
Created attachment 58387
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=58387=edit
Bug 13895: Add API routes for checkouts retrieval and renewal

GET /checkouts?borrowernumber={borrowernumber}
GET /checkouts/{checkout_id}
PUT /checkouts/{checkout_id}

+ unit tests in t/db_dependent/api/v1/checkouts.t

Test plan:
1. Open a browser tab on Koha staff and log in (to create CGISESSID
   cookie). You should have permission circulate_remaining_permissions.
2. Go to http://yourlibrary/api/v1/checkouts?borrowernumber=XXX (replace
   XXX with a borrowernumber that has checkouts) and check you receive
   correct data
3. Go to http://yourlibrary/api/v1/checkouts/YYY (replace YYY with an
   existing checkout id) and check you receive correct data
4. Send PUT requests to http://yourlibrary/api/v1/checkouts/YYY until
   the maximum number of renewals is reached (you should have a 403
   error)
5. Run unit tests in t/db_dependent/api/v1/checkouts.t

Depends on bugs 16699 and 14868

Signed-off-by: Benjamin Rokseth 

Signed-off-by: Lari Taskula 

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-10-14 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Lari Taskula  changed:

   What|Removed |Added

  Attachment #56167|0   |1
is obsolete||

--- Comment #47 from Lari Taskula  ---
Created attachment 56506
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56506=edit
Bug 13895: Add API routes for checkouts retrieval and renewal

GET /checkouts?borrowernumber={borrowernumber}
GET /checkouts/{checkout_id}
PUT /checkouts/{checkout_id}

+ unit tests in t/db_dependent/api/v1/checkouts.t

Test plan:
1. Open a browser tab on Koha staff and log in (to create CGISESSID
   cookie). You should have permission circulate_remaining_permissions.
2. Go to http://yourlibrary/api/v1/checkouts?borrowernumber=XXX (replace
   XXX with a borrowernumber that has checkouts) and check you receive
   correct data
3. Go to http://yourlibrary/api/v1/checkouts/YYY (replace YYY with an
   existing checkout id) and check you receive correct data
4. Send PUT requests to http://yourlibrary/api/v1/checkouts/YYY until
   the maximum number of renewals is reached (you should have a 403
   error)
5. Run unit tests in t/db_dependent/api/v1/checkouts.t

Depends on bugs 16699 and 14868

Signed-off-by: Benjamin Rokseth 

Signed-off-by: Lari Taskula 

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-10-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #46 from Lari Taskula  ---
(In reply to Lari Taskula from comment #45)
> (In reply to Katrin Fischer from comment #43)
> > > > We also need to resolve the question of taking opacuserlogin into 
> > > > account.
> > > Yes I think this should be discussed, for example, could it make sense for
> > > somebody to disable opacuserlogin but still wanting to have API access to
> > > own objects? Or simply control both of these under the same preference,
> > > opacuserlogin?
> > 
> > I can imagine both happening:
> > - libraries wanting to shut down any OPAC account functionality, but still
> > be able to renew in staff, so the circulation conditions are set up this
> > way. In this case, there should be a way to lock the API (opacuserlogin
> > might be a way)
> > - libraries shutting down the OPAC, because they use something else like an
> > external discovery layer. In this case they'd still want to use the API, but
> > might turn off the OPAC as far as possible.
> > 
> > Should we just make a separate switch?
> Yeah, I think it will be useful. I will open a new bug for it.
I opened Bug 17424 for discussing this & added an example 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 13895] Add API routes for checkouts retrieval and renewal

2016-10-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #45 from Lari Taskula  ---
(In reply to Benjamin Rokseth from comment #42)
> Since Bug 16699 now already is in master, I took the liberty of rebasing
> this patch against master atop on 14868 which was discussed above.
> 
> Since rebasing each patch is too much work, I merged all the previous
> patches in.
> 
> No functionality is changed, and tests are updated to match new permissions
> from Bug 14868, so I leave it as Signed off, but more testing should
> probably be done.
Thanks Benjamin!

(In reply to Katrin Fischer from comment #43)
> > > We also need to resolve the question of taking opacuserlogin into account.
> > Yes I think this should be discussed, for example, could it make sense for
> > somebody to disable opacuserlogin but still wanting to have API access to
> > own objects? Or simply control both of these under the same preference,
> > opacuserlogin?
> 
> I can imagine both happening:
> - libraries wanting to shut down any OPAC account functionality, but still
> be able to renew in staff, so the circulation conditions are set up this
> way. In this case, there should be a way to lock the API (opacuserlogin
> might be a way)
> - libraries shutting down the OPAC, because they use something else like an
> external discovery layer. In this case they'd still want to use the API, but
> might turn off the OPAC as far as possible.
> 
> Should we just make a separate switch?
Yeah, I think it will be useful. I will open a new bug for it.

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-10-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Lari Taskula  changed:

   What|Removed |Added

  Attachment #54951|0   |1
is obsolete||

--- Comment #44 from Lari Taskula  ---
Created attachment 56167
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56167=edit
Bug 13895: Add API routes for checkouts retrieval and renewal

Fixed tab-characters to spaces in api/v1/swagger/paths/checkouts.json

Signed-off-by: Benjamin Rokseth 

Signed-off-by: Lari Taskula 

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-29 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #43 from Katrin Fischer  ---

> > We also need to resolve the question of taking opacuserlogin into account.
> Yes I think this should be discussed, for example, could it make sense for
> somebody to disable opacuserlogin but still wanting to have API access to
> own objects? Or simply control both of these under the same preference,
> opacuserlogin?

I can imagine both happening:
- libraries wanting to shut down any OPAC account functionality, but still be
able to renew in staff, so the circulation conditions are set up this way. In
this case, there should be a way to lock the API (opacuserlogin might be a way)
- libraries shutting down the OPAC, because they use something else like an
external discovery layer. In this case they'd still want to use the API, but
might turn off the OPAC as far as possible.

Should we just make a separate switch?

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #42 from Benjamin Rokseth  ---
Since Bug 16699 now already is in master, I took the liberty of rebasing this
patch against master atop on 14868 which was discussed above.

Since rebasing each patch is too much work, I merged all the previous patches
in.

No functionality is changed, and tests are updated to match new permissions
from Bug 14868, so I leave it as Signed off, but more testing should probably
be done.

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Benjamin Rokseth  changed:

   What|Removed |Added

  Attachment #53890|0   |1
is obsolete||
  Attachment #53891|0   |1
is obsolete||
  Attachment #53924|0   |1
is obsolete||
  Attachment #54685|0   |1
is obsolete||

--- Comment #41 from Benjamin Rokseth  ---
Created attachment 54951
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54951=edit
Bug 13895: Add API routes for checkouts retrieval and renewal

GET /checkouts?borrowernumber={borrowernumber}
GET /checkouts/{checkout_id}
PUT /checkouts/{checkout_id}

+ unit tests in t/db_dependent/api/v1/checkouts.t

Test plan:
1. Open a browser tab on Koha staff and log in (to create CGISESSID
   cookie). You should have permission circulate_remaining_permissions.
2. Go to http://yourlibrary/api/v1/checkouts?borrowernumber=XXX (replace
   XXX with a borrowernumber that has checkouts) and check you receive
   correct data
3. Go to http://yourlibrary/api/v1/checkouts/YYY (replace YYY with an
   existing checkout id) and check you receive correct data
4. Send PUT requests to http://yourlibrary/api/v1/checkouts/YYY until
   the maximum number of renewals is reached (you should have a 403
   error)
5. Run unit tests in t/db_dependent/api/v1/checkouts.t

Depends on bugs 16699 and 14868

Signed-off-by: Benjamin Rokseth 

Signed-off-by: Lari Taskula 

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Benjamin Rokseth  changed:

   What|Removed |Added

 Depends on|15126, 16086|16699, 14868


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14868
[Bug 14868] REST API: Swagger2-driven permission checking
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15126
[Bug 15126] REST API: Use newer version of Swagger2
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16086
[Bug 16086] Add Koha::Issue objects.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16699
[Bug 16699] Swagger: Split parameters and paths, and specify required
permissions for resource
-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #40 from Lari Taskula  ---
(In reply to Katrin Fischer from comment #39)
> Should we make this also dependent on bug 14868?
I read the dev meeting logs and understood that people like the idea in Bug
14868, but as of now, I find it problematic that if any changes will still be
introduced especially in Bug 14868's dependency Bug 16699, rebasing patches
here will be quite time consuming and could cause hair-pulling. Perhaps we
could wait until Bug 16699's structure gets some type of approval?

> We also need to resolve the question of taking opacuserlogin into account.
Yes I think this should be discussed, for example, could it make sense for
somebody to disable opacuserlogin but still wanting to have API access to own
objects? Or simply control both of these under the same preference,
opacuserlogin?

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #39 from Katrin Fischer  ---
Should we make this also dependent on bug 14868?
We also need to resolve the question of taking opacuserlogin into account.

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #38 from Katrin Fischer  ---
Conclusion at the dev meeting was: I am too paranoid ;)

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #37 from Katrin Fischer  ---
But I certainly like the idea of centralizing the permission checks :)

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #36 from Katrin Fischer  ---
I think what scares me off is that 'anyone' will be able to use the API to some
extend - I am thinking of it not so much as a thing accessible to end users I
guess. There would be no way to control who uses certain functionality. Maybe
too paranoid?

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-23 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #35 from Lari Taskula  ---
(In reply to Katrin Fischer from comment #34)
> >Let user access their own checkouts and if OpacRenewalAllowed system 
> >preference
> >is on, also let user to renew their checkouts.
> 
> I am concerned about this kind of behaviour. Would it mean that any user
> (without any permission) can do this using the REST API as long as they can
> get access to a valid session cookie/log into the OPAC?
Yes, only for their own checkouts. Of course appropriate system preferences
need to be considered, as you mentioned:

> This checks for OpacRenewalAllowed, but what about opacuserlogin?
Great suggestion, I totally ignored opacuserlogin. I think it is very important
to also check opacuserlogin here and in other operations where this type of
behaviour would be useful.

There are many operations where it would be useful to let resource owner to
access their own data even if they have no special permissions for it
(checkouts/history, holds, accountlines, patron info, password change etc.).
For this behaviour, I have proposed a patch in Bug 14868 which will centralize
that feature so we don't have to check permissions/ownership in each controller
over and over again, and also for each operation will add permission
documentation into Swagger. Perhaps opacuserlogin could be considered there and
restrict access to this behaviour in every operation, if it is disabled.

> Could we make this behaviour optional?
I'm not fully sure I understand your concern enough to see why it should have
extra optionality, if this behaviour is already enabled in OPAC. If your main
concern was opacuserlogin, then I think it is enough to consider it. Are there
some other preferences that should also be considered?

Thanks for the comment Katrin, very much appreciated!

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Katrin Fischer  changed:

   What|Removed |Added

 CC||katrin.fisc...@bsz-bw.de

--- Comment #34 from Katrin Fischer  ---
>Let user access their own checkouts and if OpacRenewalAllowed system preference
>is on, also let user to renew their checkouts.

I am concerned about this kind of behaviour. Would it mean that any user
(without any permission) can do this using the REST API as long as they can get
access to a valid session cookie/log into the OPAC?

This checks for OpacRenewalAllowed, but what about opacuserlogin?

Could we make this behaviour optional?

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Julian Maurice  changed:

   What|Removed |Added

  Attachment #54196|0   |1
is obsolete||

--- Comment #32 from Julian Maurice  ---
Created attachment 54685
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54685=edit
Bug 13895: Reword borrowers to patrons in tags

We probably want to use patrons instead of borrowers; otherwise we would have
both tags since /patrons adds "patrons" as well.

Signed-off-by: Julian Maurice 

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Julian Maurice  changed:

   What|Removed |Added

 Status|Needs Signoff   |Signed Off

--- Comment #33 from Julian Maurice  ---
Signed off the last 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 13895] Add API routes for checkouts retrieval and renewal

2016-08-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #31 from Lari Taskula  ---
Created attachment 54196
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54196=edit
Bug 13895: Reword borrowers to patrons in tags

We probably want to use patrons instead of borrowers; otherwise we would have
both tags since /patrons adds "patrons" as well.

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Lari Taskula  changed:

   What|Removed |Added

 Status|Signed Off  |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 13895] Add API routes for checkouts retrieval and renewal

2016-08-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Jiri Kozlovsky  changed:

   What|Removed |Added

  Attachment #53901|0   |1
is obsolete||

--- Comment #30 from Jiri Kozlovsky  ---
Created attachment 53924
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53924=edit
[SIGNED-OFF] Bug 13895: Allow user to access their own checkouts and renew them

Let user access their own checkouts and if OpacRenewalAllowed system preference
is on, also let user to renew their checkouts.

Test plan:
1. Open a browser tab on Koha staff and log in (to create CGISESSID
   cookie) with a Patron that has no permissions. This Patron will be
   referred as "your patron" or "your borrowernumber" below.
2. Go to http://yourlibrary/api/v1/checkouts?borrowernumber=XXX (replace
   XXX with your borrowernumber) and check you receive correct data
3. Go to http://yourlibrary/api/v1/checkouts?borrowernumber=XXX (replace
   XXX with someone else's borrowernumber) and check you get a permission
   error.
4. Go to http://yourlibrary/api/v1/checkouts/YYY (replace YYY with an
   existing checkout id of your Patron) and check you receive correct data
5. Go to http://yourlibrary/api/v1/checkouts/YYY (replace YYY with an
   existing checkout id of some other Patron) and check you get a permission
   error.
6. Send PUT request to http://yourlibrary/api/v1/checkouts/YYY, replace YYY
   with existing checkout id of some other Patron. You should get a permission
   error.
7. Set system preference OpacRenewalAllowed to 0.
8. Send PUT request to http://yourlibrary/api/v1/checkouts/YYY. YYY should be
   checkout id of checkout for your patron. You should get a permission error.
9. Set system preference OpacRenewalAllowed to 1.
10. Send PUT requests to http://yourlibrary/api/v1/checkouts/YYY until
the maximum number of renewals is reached (you should have a 403
error). YYY should be checkout id of checkout for your patron.
11. Run unit tests in t/db_dependent/api/v1/checkouts.t

Signed-off-by: Jiri Kozlovsky 

Wow, works like magic! :) Nice job!

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Jiri Kozlovsky  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 13895] Add API routes for checkouts retrieval and renewal

2016-08-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Lari Taskula  changed:

   What|Removed |Added

 Status|Signed Off  |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 13895] Add API routes for checkouts retrieval and renewal

2016-08-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #29 from Lari Taskula  ---
Created attachment 53901
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53901=edit
Bug 13895: Allow user to access their own checkouts and renew them

Let user access their own checkouts and if OpacRenewalAllowed system preference
is on, also let user to renew their checkouts.

Test plan:
1. Open a browser tab on Koha staff and log in (to create CGISESSID
   cookie) with a Patron that has no permissions. This Patron will be
   referred as "your patron" or "your borrowernumber" below.
2. Go to http://yourlibrary/api/v1/checkouts?borrowernumber=XXX (replace
   XXX with your borrowernumber) and check you receive correct data
3. Go to http://yourlibrary/api/v1/checkouts?borrowernumber=XXX (replace
   XXX with someone else's borrowernumber) and check you get a permission
   error.
4. Go to http://yourlibrary/api/v1/checkouts/YYY (replace YYY with an
   existing checkout id of your Patron) and check you receive correct data
5. Go to http://yourlibrary/api/v1/checkouts/YYY (replace YYY with an
   existing checkout id of some other Patron) and check you get a permission
   error.
6. Send PUT request to http://yourlibrary/api/v1/checkouts/YYY, replace YYY
   with existing checkout id of some other Patron. You should get a permission
   error.
7. Set system preference OpacRenewalAllowed to 0.
8. Send PUT request to http://yourlibrary/api/v1/checkouts/YYY. YYY should be
   checkout id of checkout for your patron. You should get a permission error.
9. Set system preference OpacRenewalAllowed to 1.
10. Send PUT requests to http://yourlibrary/api/v1/checkouts/YYY until
the maximum number of renewals is reached (you should have a 403
error). YYY should be checkout id of checkout for your patron.
11. Run unit tests in t/db_dependent/api/v1/checkouts.t

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #28 from Lari Taskula  ---
What about user who does not have 'circulate_remaining_permissions' permission,
but wants to access his own checkouts or renew his own checkouts if
OpacRenewalAllowed is on?

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Lari Taskula  changed:

   What|Removed |Added

  Attachment #53889|0   |1
is obsolete||

--- Comment #27 from Lari Taskula  ---
Created attachment 53891
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53891=edit
[SIGNED-OFF] Bug 13895: Fixed QA demands

Signed-off-by: Frédéric Demians 
  Fix QA, and fix tests failing

Signed-off-by: Lari Taskula 

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Lari Taskula  changed:

   What|Removed |Added

  Attachment #51303|0   |1
is obsolete||

--- Comment #26 from Lari Taskula  ---
Created attachment 53890
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53890=edit
[SIGNED-OFF] Bug 13895: Add API routes for checkouts retrieval and renewal

GET /checkouts?borrowernumber={borrowernumber}
GET /checkouts/{checkout_id}
PUT /checkouts/{checkout_id}

+ unit tests in t/db_dependent/api/v1/checkouts.t

Test plan:
1. Open a browser tab on Koha staff and log in (to create CGISESSID
   cookie). You should have permission circulate_remaining_permissions.
2. Go to http://yourlibrary/api/v1/checkouts?borrowernumber=XXX (replace
   XXX with a borrowernumber that has checkouts) and check you receive
   correct data
3. Go to http://yourlibrary/api/v1/checkouts/YYY (replace YYY with an
   existing checkout id) and check you receive correct data
4. Send PUT requests to http://yourlibrary/api/v1/checkouts/YYY until
   the maximum number of renewals is reached (you should have a 403
   error)
5. Run unit tests in t/db_dependent/api/v1/checkouts.t

Depends on bug 15126

Signed-off-by: Benjamin Rokseth 

Signed-off-by: Lari Taskula 

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Frédéric Demians  changed:

   What|Removed |Added

  Attachment #53878|0   |1
is obsolete||

--- Comment #25 from Frédéric Demians  ---
Created attachment 53889
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53889=edit
Bug 13895: Fixed QA demands

Signed-off-by: Frédéric Demians 
  Fix QA, and fix tests failing

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #24 from Lari Taskula  ---
(In reply to Frédéric Demians from comment #22)
> I've just tried this patch in order to test bug 17005 depending patch. For me
> 4 tests are failing: 23, 24, 26, 27. It seems that each time, I've got this
> error:
> 
>   Can't call method "borrowernumber" on unblessed reference at
>   Koha/REST/V1/Checkout.pm line 81
> 
> It may be due to my testing environment. Can someone confirm that tests are
> still working on master?
It was a small issue in the code. Calling $checkout->borrowernumber on
unblessed reference $checkout, probably meant $checkout->{borrowernumber}
instead, or even don't unbless $checkout(?).

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Lari Taskula  changed:

   What|Removed |Added

  Attachment #53817|0   |1
is obsolete||

--- Comment #23 from Lari Taskula  ---
Created attachment 53878
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53878=edit
Bug 13895: Fixed QA demands

https://bugs.koha-community.org/show_bug.cgi?id=13895
Signed-off-by: Jiří Kozlovský 

Test plan still working

Fixes Can't call method "borrowernumber" on unblessed reference at
Koha/REST/V1/Checkout.pm line 81

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-08-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Frédéric Demians  changed:

   What|Removed |Added

 CC||frede...@tamil.fr

--- Comment #22 from Frédéric Demians  ---
I've just tried this patch in order to test bug 17005 depending patch. For me
4 tests are failing: 23, 24, 26, 27. It seems that each time, I've got this
error:

  Can't call method "borrowernumber" on unblessed reference at
  Koha/REST/V1/Checkout.pm line 81

It may be due to my testing environment. Can someone confirm that tests are
still working on 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 13895] Add API routes for checkouts retrieval and renewal

2016-08-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Jiri Kozlovsky  changed:

   What|Removed |Added

 Blocks||17005


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17005
[Bug 17005] REST API: add routes to list checkouts history
-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-07-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Jiří Kozlovský  changed:

   What|Removed |Added

 Blocks||17003


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17003
[Bug 17003] REST API: add route to get checkout's renewability
-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-07-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Jiří Kozlovský  changed:

   What|Removed |Added

 Status|Failed QA   |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 13895] Add API routes for checkouts retrieval and renewal

2016-07-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Jiří Kozlovský  changed:

   What|Removed |Added

  Attachment #53816|0   |1
is obsolete||

--- Comment #21 from Jiří Kozlovský  ---
Created attachment 53817
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53817=edit
Fixed QA demands

https://bugs.koha-community.org/show_bug.cgi?id=13895
Signed-off-by: Jiří Kozlovský 

Test plan still working

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-07-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #20 from Jiří Kozlovský  ---
Created attachment 53816
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=53816=edit
Fixed QA demands

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-06-28 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #19 from Jiří Kozlovský  ---
How can I specify the desired date_due to the API?

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-06-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Kyle M Hall  changed:

   What|Removed |Added

 Status|Signed Off  |Failed QA
 CC||k...@bywatersolutions.com

--- Comment #18 from Kyle M Hall  ---
Just a couple very minor things. If those get fixed this should Pass 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 13895] Add API routes for checkouts retrieval and renewal

2016-06-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #17 from Kyle M Hall  ---
Comment on attachment 51303
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51303
Bug 13895: Add API routes for checkouts retrieval and renewal

Review of attachment 51303:
 --> 
(https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html=13895=51303)
-

::: Koha/REST/V1/Checkout.pm
@@ +71,5 @@
> +my $checkout = Koha::Issues->find($checkout_id);
> +
> +if (!$checkout) {
> +return $c->$cb({
> +error => "Checkout doesn't exists"

Should be "Checkout doesn't exist"

@@ +76,5 @@
> +}, 404);
> +}
> +
> +$checkout = $checkout->unblessed;
> +my ($borrowernumber, $itemnumber) = @$checkout{qw(borrowernumber 
> itemnumber)};

This seems slower than
my $borrowernumber = $checkout->borrowernumber;
my $itemnumber = $checkout->itemnumber;

am I wrong?

::: api/v1/definitions/checkout.json
@@ +29,5 @@
> +"lastreneweddate": {
> +"description": "Date the item was last renewed"
> +},
> +"return": {
> +"description": "?"

Looks to be unused. Maybe we should file a bug report to remove it.

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-06-21 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Lari Taskula  changed:

   What|Removed |Added

 CC||la...@student.uef.fi

--- Comment #16 from Lari Taskula  ---
(In reply to Jiří Kozlovský from comment #14)
> have you thought of including the "renewability"/"renewable" to the list of
> returned values
+1 I think this would be useful information.

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-06-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #15 from Jiří Kozlovský  ---
By holds i meant checkouts of course, sorry :)

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-06-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Jiří Kozlovský  changed:

   What|Removed |Added

 CC||m...@jkozlovsky.cz

--- Comment #14 from Jiří Kozlovský  ---
Nice work!

have you thought of including the "renewability"/"renewable" to the list of
returned values within an hold?

We would make use of it while showing user his holds by showing/hiding renew
link to prevent misunderstanding when refused from clicking it.

Or should I create a new bug for this? I see the data comes from
C4::Circulation::GetIssues

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-06-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Josef Moravec  changed:

   What|Removed |Added

 Blocks||16652


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16652
[Bug 16652] RestfulAPI supporting services for Vufind and for xnciptoolkit
drivers
-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-05-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Benjamin Rokseth  changed:

   What|Removed |Added

  Attachment #50021|0   |1
is obsolete||

--- Comment #13 from Benjamin Rokseth  ---
Created attachment 51303
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51303=edit
Bug 13895: Add API routes for checkouts retrieval and renewal

GET /checkouts?borrowernumber={borrowernumber}
GET /checkouts/{checkout_id}
PUT /checkouts/{checkout_id}

+ unit tests in t/db_dependent/api/v1/checkouts.t

Test plan:
1. Open a browser tab on Koha staff and log in (to create CGISESSID
   cookie). You should have permission circulate_remaining_permissions.
2. Go to http://yourlibrary/api/v1/checkouts?borrowernumber=XXX (replace
   XXX with a borrowernumber that has checkouts) and check you receive
   correct data
3. Go to http://yourlibrary/api/v1/checkouts/YYY (replace YYY with an
   existing checkout id) and check you receive correct data
4. Send PUT requests to http://yourlibrary/api/v1/checkouts/YYY until
   the maximum number of renewals is reached (you should have a 403
   error)
5. Run unit tests in t/db_dependent/api/v1/checkouts.t

Depends on bug 15126

Signed-off-by: Benjamin Rokseth 

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-05-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Benjamin Rokseth  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 13895] Add API routes for checkouts retrieval and renewal

2016-05-06 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

--- Comment #12 from Benjamin Rokseth  ---
Rebased against master with Bug 15126 and Bug 13903.

Also fixed tests failing above due to missing branchcode in AddIssue and
calculated duedate on renewal.

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-04-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

David Cook  changed:

   What|Removed |Added

 CC||dc...@prosentient.com.au

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-04-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Benjamin Rokseth  changed:

   What|Removed |Added

 CC||benjamin.roks...@kul.oslo.k
   ||ommune.no

--- Comment #11 from Benjamin Rokseth  ---
Rebased against #15548 Move Koha::Borrower -> Koha::Patron

Works fine in API, but tests fail:

not ok 23 - 200 OK
#   Failed test '200 OK'
#   at t/db_dependent/api/v1/checkouts.t line 119.
#  got: '500'
# expected: '200'
not ok 24 - exact match for JSON Pointer "/date_due"
#   Failed test 'exact match for JSON Pointer "/date_due"'
#   at t/db_dependent/api/v1/checkouts.t line 119.
#  got: undef
# expected: '2016-04-14 23:59:00'
ok 25 - PUT /api/v1/checkouts/6
not ok 26 - 403 Forbidden
#   Failed test '403 Forbidden'
#   at t/db_dependent/api/v1/checkouts.t line 125.
#  got: '500'
# expected: '403'
not ok 27 - exact match for JSON Pointer ""
#   Failed test 'exact match for JSON Pointer ""'
#   at t/db_dependent/api/v1/checkouts.t line 125.
# Structures begin differing at:
#  $got = undef
# $expected = HASH(0xa7d1648)
# Looks like you failed 4 tests of 27.

Relevant log entry:

No branchcode argument passed to Koha::Calendar->new at
/kohadev/kohaclone/C4/Circulation.pm line 3588

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-04-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Benjamin Rokseth  changed:

   What|Removed |Added

  Attachment #45817|0   |1
is obsolete||

--- Comment #10 from Benjamin Rokseth  ---
Created attachment 50021
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50021=edit
Bug 13895: Add API routes for checkouts retrieval and renewal

GET /checkouts?borrowernumber={borrowernumber}
GET /checkouts/{checkout_id}
PUT /checkouts/{checkout_id}

+ unit tests in t/db_dependent/api/v1/checkouts.t

Test plan:
1. Open a browser tab on Koha staff and log in (to create CGISESSID
   cookie). You should have permission circulate_remaining_permissions.
2. Go to http://yourlibrary/api/v1/checkouts?borrowernumber=XXX (replace
   XXX with a borrowernumber that has checkouts) and check you receive
   correct data
3. Go to http://yourlibrary/api/v1/checkouts/YYY (replace YYY with an
   existing checkout id) and check you receive correct data
4. Send PUT requests to http://yourlibrary/api/v1/checkouts/YYY until
   the maximum number of renewals is reached (you should have a 403
   error)
5. Run unit tests in t/db_dependent/api/v1/checkouts.t

Depends on bug 15126

-- 
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 13895] Add API routes for checkouts retrieval and renewal

2016-03-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Alex Sassmannshausen  changed:

   What|Removed |Added

 Depends on||16086
 CC||alex.sassmannshausen@ptfs-e
   ||urope.com


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16086
[Bug 16086] Add Koha::Issue objects.
-- 
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 13895] Add API routes for checkouts retrieval and renewal

2015-12-18 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Julian Maurice  changed:

   What|Removed |Added

Summary|Add API routes for issues   |Add API routes for
   |retrieval and renewal   |checkouts retrieval and
   ||renewal
 Depends on|13799   |15126


Referenced Bugs:

http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13799
[Bug 13799] Add base for building RESTful API
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15126
[Bug 15126] REST API: Use newer version of Swagger2
-- 
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 13895] Add API routes for checkouts retrieval and renewal

2015-12-18 Thread bugzilla-daemon
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13895

Josef Moravec  changed:

   What|Removed |Added

 CC||josef.mora...@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/