https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33080

--- Comment #4 from Martin Renvoize <[email protected]> ---
Comment on attachment 147662
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147662
Bug 33080: Introduce objects.search_rs, objects.find_rs and objects.to_api

Review of attachment 147662:
 --> 
(https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=33080&attachment=147662)
-----------------------------------------------------------------

::: Koha/REST/Plugin/Objects.pm
@@ +243,3 @@
>  
>              # Perform search
>              my $objects = $result_set->search( $filtered_params, $attributes 
> );

I think we need to rework the pagination handling a little for this change.  We
can't really keep it inside this method now that it returns a resultset that
we're expecting developers to then further filter and refine.

I think we should update the add_pagination_headers helper to accept a
resultset.. it can then build the total and base_total fields itself by
executing the count and looking at the pager in the resultset passed.

We could then call this automatically in the non-rs search header above and
document that it should be called by the developer in their controller after
they've applied their own additional filtering etc in the controller if they're
using the _rs helper.

For this.. I'm failing QA.. But I do really like where this is headed.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://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/

Reply via email to