[Koha-bugs] [Bug 21063] Allow columns in intranet ILL request datatable to be customisable

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Mar 1 10:39:07 CET 2019


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

--- Comment #41 from Josef Moravec <josef.moravec at gmail.com> ---
(In reply to Andrew Isherwood from comment #40)
> (In reply to Josef Moravec from comment #36)
> > Comment on attachment 84788 [details] [review] [review]
> > Bug 21063: (follow-up) Add user ID to column list
> > 
> > Review of attachment 84788 [details] [review] [review]:
> > -----------------------------------------------------------------
> > 
> > ::: Koha/REST/V1/Illrequests.pm
> > @@ +125,4 @@
> > >          foreach my $p(@{$patron_arr}) {
> > >              if ($p->{borrowernumber} == $req->borrowernumber) {
> > >                  $to_push->{patron} = {
> > > +                    borrowernumber => $p->{borrowernumber},
> > 
> > according to our api name conventions, this should be patron_id
> 
> Thanks for that Josef, this is now done. It has introduced a slight
> inconsistency in that we now have the following in the API response:
> 
> Request object:
> {
>     [...]
>     borrowernumber: 123,
>     patron: {
>         patron_id: 123
>     }
>     [...]
> }
> 
> The borrowernumber in the request object comes directly from the column name
> in the request table. It feels potentially error prone to start introducing
> mapping from borrowernumber->patron_id on egress and
> patron_id->borrowernumber on ingress. What do you think?
> 
> I don't know, in my mind, it's not an ideal situation to be in having a
> naming convention for API routes that differs from the naming convention
> everywhere else, but that's how it is, so I guess we just need to work with
> it.

We should take the rfc to development meeting, vote it and then update the
endpoint as it was done with /holds endpoint

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list