Bug 14749

Summary: Add API route to get top issues
Product: Koha Reporter: Julian Maurice <julian.maurice>
Component: Web servicesAssignee: Julian Maurice <julian.maurice>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: bgkriegel, josef.moravec, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Medium patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 13799, 14788    
Bug Blocks:    
Attachments: Bug 14749: Add API route /v1/topissues
Bug 14749: Add API route /v1/topissues
Bug 14749: Add API route /v1/topissues
Bug 14749: Add unit tests for /topissues

Description Julian Maurice 2015-08-28 07:42:59 UTC
Add API route to get top issues
Comment 1 Julian Maurice 2015-08-28 07:45:37 UTC Comment hidden (obsolete)
Comment 2 Zeno Tajoli 2015-09-01 08:18:42 UTC
Patch complexity is 'Medium' because this change has many architectural connections
Comment 3 Julian Maurice 2015-09-04 14:23:53 UTC
Created attachment 42408 [details] [review]
Bug 14749: Add API route /v1/topissues

See Swagger specification for documentation
Comment 4 Julian Maurice 2015-09-04 14:25:16 UTC
Bug split to separate the refactoring of opac-topissues.pl (bug 14788) from the new API route
Comment 5 Bernardo Gonzalez Kriegel 2016-01-05 00:33:07 UTC
Please, can you provide a test plan?
Don't know what to do with this.
Comment 6 Josef Moravec 2016-10-16 08:31:25 UTC
Needs rebase, especially because of swagger specifiction being separate in more json files.
Comment 7 Julian Maurice 2018-02-06 12:56:34 UTC
Created attachment 71248 [details] [review]
Bug 14749: Add API route /v1/topissues

See Swagger specification for documentation
Comment 8 Julian Maurice 2018-02-06 12:56:37 UTC
Created attachment 71249 [details] [review]
Bug 14749: Add unit tests for /topissues
Comment 9 Julian Maurice 2018-02-06 13:05:48 UTC
Patch rebased on master + tests

Test plan:
1) Go to http://OPAC/cgi-bin/koha/opac-topissues.pl and http://OPAC/api/v1/topissues and compare the results. They must be the same, given a set of parameters

Parameters matching:
"Show the top" corresponds to api parameter 'count'
"From" corresponds to api parameter 'branch'
"Limit to" corresponds to api parameter 'itemtype'
"Acquired in the last" corresponds to api parameter 'newness' (in days)
Comment 10 Katrin Fischer 2018-02-18 11:30:05 UTC
Hi Julian,
could you add your proposal to https://wiki.koha-community.org/wiki/REST_api_RFCs please?

I think we'd like to change a few things like branch -> library, biblionumber -> biblio_id.

 Also adding Tomas to stop me if I am mistaken :)