[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2022-10-27 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Tomás Cohen Arazi  changed:

   What|Removed |Added

   Keywords||rel_22_11_candidate

--- Comment #50 from Tomás Cohen Arazi  ---
(In reply to Lucas Gass from comment #49)
> Tomas,
> 
> This is marked as 'ASSIGNED', is there work to do or is ready for testing?

We need to rework this a bit. I marked it for inclusion in 22.11 and will
submit a revisited version ASAP.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2022-10-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #49 from Lucas Gass  ---
Tomas,

This is marked as 'ASSIGNED', is there work to do or is ready for testing?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2022-10-17 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #48 from Jonathan Druart  ---
Make the REST API returns a "_str" key (generated only if you requested it)
which would contains the stringified values
{
  _str: { attr: "stringified_value" },
  attr: "coded_value"
}

JS code would be
  let string_to_display = json._str.attr || json.attr

Not sure why this is still stuck.

I needed it for ERM and ended with retrieving the AVs from the TT plugin,
serialized to JSON and cached them.

The main problem is that we don't even have a route for AVs.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

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

Tomás Cohen Arazi  changed:

   What|Removed |Added

   Assignee|agustinmoy...@theke.io  |tomasco...@gmail.com
 Status|In Discussion   |ASSIGNED

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2022-10-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #47 from Tomás Cohen Arazi  ---
(In reply to David Cook from comment #46)
> In any case, I reckon backwards compatibility is important, especially since
> we're still using "v1" for the API, so I don't think we can change the
> existing "location" field.

Agreed!

> On non-Koha projects where I've needed to maintain backwards compatibility,
> I've added fields like "location_description". 

Right. We also need the category it is linked to, do we can draw things like
drop-downs.

> Sometimes, I think that authorised values should be removed from item data,
> and replaced with proper foreign key references. 
> 
> Location is an important field which by rights deserves its own database
> table I think.

Locations, collections... We've done that with credit/debit tired recently.

> Of course, that data migration is easier said than done...

Generally speaking, the problem is lack of infinite time.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2022-10-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #44 from Lucas Gass  ---
*** Bug 31683 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2022-06-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #43 from Tomás Cohen Arazi  ---
One thing to consider is we should (ideally) not change the API often so devs
can rely on it. That said what if we streamline the data structure (i.e. do not
return the AV object, but just the description, making it context (opac?)) and
try this.

Once we find a better pattern in real-life uses, we can flag this as 'slow' and
propose a different one, while keeping it for some cases in which it really
doesn't hurt performance. Bug 8179 is a real example of using this feature
without any noticeable overhead.

So maybe when this is *not enough* we look for other approaches.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2022-06-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #42 from Martin Renvoize  ---
I'm still coming back around to comment #32, in particular:

> a single page web app would actually grab the full AV list when it first
> needs it and cache it locally to use for subsequent uses..

I think for efficiency we're going to really struggle with embedding AV's
dynamically in the results.  I'm thinking more and more we need to focus on
having AV and Framework routes and then building a JS equivalent to the
RecordProcessor pattern for the UI.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2022-06-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Lucas Gass  changed:

   What|Removed |Added

 CC||lu...@bywatersolutions.com

--- Comment #41 from Lucas Gass  ---
Would love to see this get unstuck, authorized values descriptions from the
REST API would be really handy!

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2022-04-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

George Williams (NEKLS)  changed:

   What|Removed |Added

 CC||geo...@nekls.org

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2022-02-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #40 from Tomás Cohen Arazi  ---
(In reply to Katrin Fischer from comment #39)
> Trying to comment here in order to get this unstuck... maybe.
> 
> As this is going to be used for bug 8179 which I very much would like to see
> moving :)
> 
> If I understand Tomas last comment correctly the problem might be with
> result lists that contain objects that can have different sets of AV
> mappings... does that sound right?
> 
> I am thinking about a list of order lines (aqorders) where every order line
> is linked to a fund... that can be linked to different or none AV for the 2
> statistical values.

Right, the idea is to make each object return (inside of it) done generic
structure that lets the caller know how to find the av description. I'll get
back to this next week, as we are responsible for having 8179 done, as the
sponsor requested. We just need that people having different pov on the matter
just say how they'd do it. And eventually vote something.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2022-02-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #39 from Katrin Fischer  ---
Trying to comment here in order to get this unstuck... maybe.

As this is going to be used for bug 8179 which I very much would like to see
moving :)

If I understand Tomas last comment correctly the problem might be with result
lists that contain objects that can have different sets of AV mappings... does
that sound right?

I am thinking about a list of order lines (aqorders) where every order line is
linked to a fund... that can be linked to different or none AV for the 2
statistical values.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2022-01-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #38 from Tomás Cohen Arazi  ---
We name itemtype => item_type_id, branchcode => library_id, etc. We do that so
we can do things like:

x-koha-embed: item_type,library

So we already have a generic way if doing it. You just add a method that
returns the thing and add an embed definition on the API.

The problem is, frameworks define how attributes are mapped to avs, and as such
you cannot know in advance what you would need to embed. And even if you know
in advance that some attribute is married to an av, it could happen that there
isn't a match just because (of data). So maybe one item has a corresponding av,
and the other doesn't, on a resultset.

It felt (some time ago already) that it was better to return a structure in
which you could query for the descriptions.

I'm ok with whatever we decide, as long as it is practical and consistent. And
we can use so we can push bug 8179 to master, which is hurting the sponsors for
a year already.

Bug 8179 needs some more polishing for sure, but uncertainty made it get stuck.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2022-01-12 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #37 from Jonathan Druart  ---
What's next? Should we go with the proposed patches or think something else?

(In reply to Jonathan Druart from comment #29)
> What about having it more generic? At least the naming to start.
> 
> We will want to "expand" itemtypes as well for instance.
> Do we really need the whole Koha::AV object or do we finally only need the
> description?
> 
> It's similar to the 'columns_to_str' methods I introduced on bug 27526 (yes
> Tomas, I know you told me already), where we want to have stringified values
> of object's attributes.

This comment didn't get a reply, and I still think it's what we need here. A
stringified version of codes seem sensible. It will work for AVs, branchcode,
itemtypes, etc.
However it will bring the problem of translatability (but same problem will
appear with the current version). In a first step we only want to support AVs
so this problem is for later.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-09-13 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #36 from Kyle M Hall  ---
Started an API Users Guide on the Wiki:
https://wiki.koha-community.org/wiki/Koha_REST_API_Users_Guide

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-09-10 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Jonathan Druart  changed:

   What|Removed |Added

 Status|Passed QA   |In Discussion

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-09-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #35 from Kyle M Hall  ---
It would also be nice if it could be embedded in the self-documentation
somehow.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-09-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #34 from Kyle M Hall  ---
(In reply to Tomás Cohen Arazi from comment #33)
> (In reply to Martin Renvoize from comment #32)
> > Hmmm, if that's the case I'm not sure I understand why there are tests for
> > the search helper.. surely that will generally return multiple results?
> > 
> > I'm vaguely feeling like a single page web app would actually grab the full
> > AV list when it first needs it and cache it locally to use for subsequent
> > uses.. but as Koha isn't at that point yet we're unlikely to be able to
> > really utilise that methodology..
> 
> If you need to render a list of (say) items, you will need to be able to
> make the GET /items call return not only the 'damaged' attribute, but also a
> way to return the linked AV, for rendering purposes.
> 
> The only thing that I'm not sure about this dev, is that (maybe) we want
> more fine-grained control of what objects should have their AVs expanded.
> For example, if we wanted the list of the items on a bib to display them
> grouped by the library they were checked out (I know, rare example heh):
> 
> GET /biblio/123
> x-koha-av-expand: true
> x-koha-embed: items.checkouts
> 
> would mean we expand AVs for biblio, items, but also for the related
> checkouts (a probably expensive thing, as we don't have relationships in
> place for prefetching).
> 
> I would prefer a syntax that allows us to do:
> 
> GET /biblio/123
> x-koha-embed: items+av,items.checkouts

Where will this be documented? I think the biggest weakness with our API is a
derth of documentation for end users. We have some much great functionality
that most API users don't even know exists let alone how to use it! This is a
great example.

I'd really love to see at a minimum, this be documented on a wiki page. We
could start there, and perhaps build an API User's Handbook, or even just an
API User's Cookbook just like the SQL Reports and Javscript library pages.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-09-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #33 from Tomás Cohen Arazi  ---
(In reply to Martin Renvoize from comment #32)
> Hmmm, if that's the case I'm not sure I understand why there are tests for
> the search helper.. surely that will generally return multiple results?
> 
> I'm vaguely feeling like a single page web app would actually grab the full
> AV list when it first needs it and cache it locally to use for subsequent
> uses.. but as Koha isn't at that point yet we're unlikely to be able to
> really utilise that methodology..

If you need to render a list of (say) items, you will need to be able to make
the GET /items call return not only the 'damaged' attribute, but also a way to
return the linked AV, for rendering purposes.

The only thing that I'm not sure about this dev, is that (maybe) we want more
fine-grained control of what objects should have their AVs expanded. For
example, if we wanted the list of the items on a bib to display them grouped by
the library they were checked out (I know, rare example heh):

GET /biblio/123
x-koha-av-expand: true
x-koha-embed: items.checkouts

would mean we expand AVs for biblio, items, but also for the related checkouts
(a probably expensive thing, as we don't have relationships in place for
prefetching).

I would prefer a syntax that allows us to do:

GET /biblio/123
x-koha-embed: items+av,items.checkouts

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-09-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Martin Renvoize  changed:

   What|Removed |Added

   See Also||https://bugs.koha-community
   ||.org/bugzilla3/show_bug.cgi
   ||?id=28874

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-09-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #32 from Martin Renvoize  ---
Hmmm, if that's the case I'm not sure I understand why there are tests for the
search helper.. surely that will generally return multiple results?

I'm vaguely feeling like a single page web app would actually grab the full AV
list when it first needs it and cache it locally to use for subsequent uses..
but as Koha isn't at that point yet we're unlikely to be able to really utilise
that methodology..

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-08-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #31 from Agustín Moyano  ---
(In reply to Martin Renvoize from comment #30)
> I have another question regards the output representation.. I've come round
> to the lookup table approach.. but shouldn't there be another level in there?
> 
> {
>   "_authorised_values": {
> "location": {
>   "authorised_value": "GEN",
>   "category": "LOC",
>   "id": 27,
>   "imageurl": null,
>   "lib": "General Stacks",
>   "lib_opac": null
> }
>   },
>   "location": "GEN"
> }
> 
> 
> What about for searches.. it's unlikely all items will be in the 'GEN'
> location.. so wouldn't we actually need:
> 
> {
>   "_authorised_values": {
> "location": {
>   "GEN": "General Stacks",
>   "SHELVES": "Shelves"
> },
>   },
>   "location": "GEN"
> }
> 
> Where the key is the AV code and the value is the appropriate description
> (based on public vs staff.
> 
> Not sure we need any of the rest of the AV object detail honestly.. perhaps
> the imageurl later...

Hi Martin, I did not think this to fill a search or select options (I thought
better for that to have an authorised values endpoint).

I designed the _authorised_values attribute to just bring the value of an
authorised value in the original json.

I'm not saying we shouldn't do it.. I just don't think it wise to bring every
possible value here.. I've seen AV categories with hundreds of AV

About what info of the AV should we bring, it's true that in most cases you
would only need lib or lib_opac, but I didn't new if someone else for some
reason would need any of the other info.. maybe we should sheep category too,
to be able to populate a search or a select with the category options

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-08-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #30 from Martin Renvoize  ---
I have another question regards the output representation.. I've come round to
the lookup table approach.. but shouldn't there be another level in there?

{
  "_authorised_values": {
"location": {
  "authorised_value": "GEN",
  "category": "LOC",
  "id": 27,
  "imageurl": null,
  "lib": "General Stacks",
  "lib_opac": null
}
  },
  "location": "GEN"
}


What about for searches.. it's unlikely all items will be in the 'GEN'
location.. so wouldn't we actually need:

{
  "_authorised_values": {
"location": {
  "GEN": "General Stacks",
  "SHELVES": "Shelves"
},
  },
  "location": "GEN"
}

Where the key is the AV code and the value is the appropriate description
(based on public vs staff.

Not sure we need any of the rest of the AV object detail honestly.. perhaps the
imageurl later...

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-08-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Jonathan Druart  changed:

   What|Removed |Added

 CC||jonathan.druart+koha@gmail.
   ||com

--- Comment #29 from Jonathan Druart  ---
What about having it more generic? At least the naming to start.

We will want to "expand" itemtypes as well for instance.
Do we really need the whole Koha::AV object or do we finally only need the
description?

It's similar to the 'columns_to_str' methods I introduced on bug 27526 (yes
Tomas, I know you told me already), where we want to have stringified values of
object's attributes.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-08-31 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #28 from Jonathan Druart  ---
Created attachment 124268
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=124268=edit
Bug 26635: Add tests for av-expand => 0

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-05-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #27 from Kyle M Hall  ---
Created attachment 120700
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120700=edit
Bug 26635: Expand authorised values in to_api method

This patch adds the posibility to expand authorised values when to_api
method is called.

The classes where authorised values should expand must implememnt the
_fetch_authorised_values method, and must return a hash like the
following

{
  column_name => Koha::AuthorisedValue->unblessed
  ...
}

This patch will be used in bug 8179, so please test there.

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Andrew Fuerste-Henry 

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
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-05-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Kyle M Hall  changed:

   What|Removed |Added

 Attachment #116592|0   |1
is obsolete||
 Attachment #116593|0   |1
is obsolete||

--- Comment #25 from Kyle M Hall  ---
Created attachment 120698
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120698=edit
Bug 26635: Add tests

Add tests in t/db_dependent/Koha/Object.t and
t/db_dependent/Koha/REST/Plugin/Objects.t

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Tomas Cohen Arazi 

Signed-off-by: Andrew Fuerste-Henry 

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
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-05-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Kyle M Hall  changed:

   What|Removed |Added

 Attachment #120698|0   |1
is obsolete||

--- Comment #26 from Kyle M Hall  ---
Created attachment 120699
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=120699=edit
Bug 26635: Add tests

Add tests in t/db_dependent/Koha/Object.t and
t/db_dependent/Koha/REST/Plugin/Objects.t

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Tomas Cohen Arazi 

Signed-off-by: Andrew Fuerste-Henry 

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
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-05-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

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
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-05-07 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Kyle M Hall  changed:

   What|Removed |Added

 CC||k...@bywatersolutions.com
 QA Contact||k...@bywatersolutions.com

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-04-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #24 from Tomás Cohen Arazi  ---
(In reply to Agustín Moyano from comment #23)
> 
> Now it is actually doing a "to_api" on avs when it does:
> 
> 
> +$avs = $self->_do_api_mapping($avs);
> 
> and then
> 
> +sub _do_api_mapping {
> +my ($self, $json_object) = @_;
> +# Rename attributes if there's a mapping
> +if ( $self->can('to_api_mapping') ) {
> +foreach my $column ( keys %{ $self->to_api_mapping } ) {
> +my $mapped_column = $self->to_api_mapping->{$column};
> +if ( exists $json_object->{$column}
> +&& defined $mapped_column )
> +{
> +# key != undef
> +$json_object->{$mapped_column} = delete
> $json_object->{$column};
> +}
> +elsif ( exists $json_object->{$column}
> +&& !defined $mapped_column )
> +{
> +# key == undef
> +delete $json_object->{$column};
> +}
> +}
> +}
>  return $json_object;
>  }
> 
> what we are currently lacking is "to_api_mapping" in AuthorisedValues

Well, we certainly need that, but we also need to call ->to_api instead of the
hand-crafted _do_api_mapping(). That's because we could want to call it with {
public => 1 } and thus making the av representation dependent on the context.
This example snippet from an hypothetical Koha::AuthorisedValue->to_api() might
illustrate what I mean:

my $json = $self->SUPER::to_api($params);

my $description = $json->{description};
$description = $json->{description_opac}
if $params->{public}
   and defined $json->{description_opac}
   and $json->{description_opac} ne '';

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-04-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #23 from Agustín Moyano  ---
(In reply to Martin Renvoize from comment #22)
> (In reply to Tomás Cohen Arazi from comment #21)
> > (In reply to Tomás Cohen Arazi from comment #18)
> > > (In reply to Martin Renvoize from comment #17)
> > > > I'm not sure we need the full AV object expanded.. and I'm thinking if 
> > > > would
> > > > be 'nicer' to access it directly rather than have to do a subsequent 
> > > > lookup
> > > > in JS?
> > > 
> > > I would go for an $av->to_api object, that names things better: 
> > > lib/lib_opac
> > > => description, picking the right one according to the caller context.
> > 
> > What do you think, Agustín?
> 
> I'm onboard with this... embedding them and using to_api to make the naming
> clear.. I reckon we could be onto a winner

Now it is actually doing a "to_api" on avs when it does:


+$avs = $self->_do_api_mapping($avs);

and then

+sub _do_api_mapping {
+my ($self, $json_object) = @_;
+# Rename attributes if there's a mapping
+if ( $self->can('to_api_mapping') ) {
+foreach my $column ( keys %{ $self->to_api_mapping } ) {
+my $mapped_column = $self->to_api_mapping->{$column};
+if ( exists $json_object->{$column}
+&& defined $mapped_column )
+{
+# key != undef
+$json_object->{$mapped_column} = delete
$json_object->{$column};
+}
+elsif ( exists $json_object->{$column}
+&& !defined $mapped_column )
+{
+# key == undef
+delete $json_object->{$column};
+}
+}
+}
 return $json_object;
 }

what we are currently lacking is "to_api_mapping" in AuthorisedValues

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-04-01 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #22 from Martin Renvoize  ---
(In reply to Tomás Cohen Arazi from comment #21)
> (In reply to Tomás Cohen Arazi from comment #18)
> > (In reply to Martin Renvoize from comment #17)
> > > I'm not sure we need the full AV object expanded.. and I'm thinking if 
> > > would
> > > be 'nicer' to access it directly rather than have to do a subsequent 
> > > lookup
> > > in JS?
> > 
> > I would go for an $av->to_api object, that names things better: lib/lib_opac
> > => description, picking the right one according to the caller context.
> 
> What do you think, Agustín?

I'm onboard with this... embedding them and using to_api to make the naming
clear.. I reckon we could be onto a winner

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-03-15 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #21 from Tomás Cohen Arazi  ---
(In reply to Tomás Cohen Arazi from comment #18)
> (In reply to Martin Renvoize from comment #17)
> > I'm not sure we need the full AV object expanded.. and I'm thinking if would
> > be 'nicer' to access it directly rather than have to do a subsequent lookup
> > in JS?
> 
> I would go for an $av->to_api object, that names things better: lib/lib_opac
> => description, picking the right one according to the caller context.

What do you think, Agustín?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-02-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #20 from Agustín Moyano  ---
Created attachment 116593
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116593=edit
Bug 26635: Expand authorised values in to_api method

This patch adds the posibility to expand authorised values when to_api
method is called.

The classes where authorised values should expand must implememnt the
_fetch_authorised_values method, and must return a hash like the
following

{
  column_name => Koha::AuthorisedValue->unblessed
  ...
}

This patch will be used in bug 8179, so please test there.

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Andrew Fuerste-Henry 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-02-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Agustín Moyano  changed:

   What|Removed |Added

 Attachment #116234|0   |1
is obsolete||
 Attachment #116235|0   |1
is obsolete||

--- Comment #19 from Agustín Moyano  ---
Created attachment 116592
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116592=edit
Bug 26635: Add tests

Add tests in t/db_dependent/Koha/Object.t and
t/db_dependent/Koha/REST/Plugin/Objects.t

Sponsored-by: Virginia Polytechnic Institute and State University

Signed-off-by: Tomas Cohen Arazi 

Signed-off-by: Andrew Fuerste-Henry 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-02-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #18 from Tomás Cohen Arazi  ---
(In reply to Martin Renvoize from comment #17)
> This would more closely resemble how we return the data in the existing UI's.

It is possible. But that means you will need to look at the attribute and
determine if it is linked to an AV or not anyway. You could have a scalar or
the attribute be an object. And if it is an object it could be some generated
structure or an embed. We would still need to define a generic way to identify
it is the case of an av-linked attribute. I'm not sure what's best, but having
a separate lookup table felt cleaner to use. In the templates you would have
proper objects that can be asked if they are av-linked.

This certainly needs ideas. We are open to proposals, obviously!

> I'm not sure we need the full AV object expanded.. and I'm thinking if would
> be 'nicer' to access it directly rather than have to do a subsequent lookup
> in JS?

I would go for an $av->to_api object, that names things better: lib/lib_opac =>
description, picking the right one according to the caller context.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-02-03 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Martin Renvoize  changed:

   What|Removed |Added

 CC||martin.renvoize@ptfs-europe
   ||.com

--- Comment #17 from Martin Renvoize  ---
This is interesting, and the code is nice to follow.

I wonder a bit about the output form however... should we not expand AV's
inline?

So rather than:

GET /api/v1/items/1

{
"_authorised_values": {
"location": {
"authorised_value": "GEN",
"category": "LOC",
"id": 27,
"imageurl": null,
"lib": "General Stacks",
"lib_opac": null
}
},
"acquisition_date": "2014-05-07",
"acquisition_source": null,
"biblio_id": 1,
"item_id": 1,
...
"location": "GEN",
...
"uri": null,
"withdrawn": 0,
"withdrawn_date": null
}

We would do

GET /api/v1/items/1

{
"acquisition_date": "2014-05-07",
"acquisition_source": null,
"biblio_id": 1,
"item_id": 1,
...
"location": {
"code": "GEN",
"description": "General Stacks",
"imageurl": null
},
...
"uri": null,
"withdrawn": 0,
"withdrawn_date": null
}

and

GET /public/items/1

{
"acquisition_date": "2014-05-07",
"acquisition_source": null,
"biblio_id": 1,
"item_id": 1,
...
"location": {
"code": "GEN",
"description": null,
"imageurl": null
},
...
"uri": null,
"withdrawn": 0,
"withdrawn_date": null
}

This would more closely resemble how we return the data in the existing UI's.

I'm not sure we need the full AV object expanded.. and I'm thinking if would be
'nicer' to access it directly rather than have to do a subsequent lookup in JS?

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-02-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Andrew Fuerste-Henry  changed:

   What|Removed |Added

 Attachment #116233|0   |1
is obsolete||

--- Comment #16 from Andrew Fuerste-Henry  ---
Created attachment 116235
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116235=edit
Bug 26635: Expand authorised values in to_api method

This patch adds the posibility to expand authorised values when to_api
method is called.

The classes where authorised values should expand must implememnt the
_fetch_authorised_values method, and must return a hash like the
following

{
  column_name => Koha::AuthorisedValue->unblessed
  ...
}

This patch will be used in bug 8179, so please test there.

Sponsored-by: Virginia Tech Libraries

Signed-off-by: Andrew Fuerste-Henry 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-02-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Andrew Fuerste-Henry  changed:

   What|Removed |Added

 Attachment #116232|0   |1
is obsolete||

--- Comment #15 from Andrew Fuerste-Henry  ---
Created attachment 116234
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116234=edit
Bug 26635: Add tests

Add tests in t/db_dependent/Koha/Object.t and
t/db_dependent/Koha/REST/Plugin/Objects.t

Sponsored-by: Virginia Tech Libraries

Signed-off-by: Tomas Cohen Arazi 

Signed-off-by: Andrew Fuerste-Henry 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-02-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Andrew Fuerste-Henry  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
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-02-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #14 from Tomás Cohen Arazi  ---
Created attachment 116233
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116233=edit
Bug 26635: Expand authorised values in to_api method

This patch adds the posibility to expand authorised values when to_api
method is called.

The classes where authorised values should expand must implememnt the
_fetch_authorised_values method, and must return a hash like the
following

{
  column_name => Koha::AuthorisedValue->unblessed
  ...
}

This patch will be used in bug 8179, so please test there.

Sponsored-by: Virginia Tech Libraries

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-02-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #13 from Tomás Cohen Arazi  ---
Created attachment 116232
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=116232=edit
Bug 26635: Add tests

Add tests in t/db_dependent/Koha/Object.t and
t/db_dependent/Koha/REST/Plugin/Objects.t

Sponsored-by: Virginia Tech Libraries

Signed-off-by: Tomas Cohen Arazi 

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-02-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #112539|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
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-02-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Attachment #112538|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
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-02-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Status|Failed QA   |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-02-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Blocks||8179


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8179
[Bug 8179] Receiving multiple order lines at once
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-02-02 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Tomás Cohen Arazi  changed:

   What|Removed |Added

 Blocks|26636   |
 Depends on||26636


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26636
[Bug 26636] New objects.find mojolicious helper
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2021-01-25 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

David Nind  changed:

   What|Removed |Added

 Status|Needs Signoff   |Failed QA
 CC||da...@davidnind.com

--- Comment #12 from David Nind  ---
Patches apply, but running prove t/db_dependent/Koha/REST/Plugin/Objects.t
fails (prove t/db_dependent/Koha/Object.t passes):

prove t/db_dependent/Koha/REST/Plugin/Objects.t
t/db_dependent/Koha/REST/Plugin/Objects.t .. Global symbol "$t" requires
explicit package name (did you forget to declare "my $t"?) at
t/db_dependent/Koha/REST/Plugin/Objects.t line 470.
Execution of t/db_dependent/Koha/REST/Plugin/Objects.t aborted due to
compilation errors.
# Looks like your test exited with 255 before it could output anything.
t/db_dependent/Koha/REST/Plugin/Objects.t .. Dubious, test returned 255 (wstat
65280, 0xff00)
Failed 11/11 subtests 

Test Summary Report
---
t/db_dependent/Koha/REST/Plugin/Objects.t (Wstat: 65280 Tests: 0 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 11 tests but ran 0.
Files=1, Tests=0,  1 wallclock secs ( 0.03 usr  0.00 sys +  1.04 cusr  0.09
csys =  1.16 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
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2020-10-30 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Agustín Moyano  changed:

   What|Removed |Added

 Blocks|8179|


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8179
[Bug 8179] Receiving multiple order lines at once
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2020-10-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #11 from Agustín Moyano  ---
(In reply to Andrew Fuerste-Henry from comment #8)
> Can't apply this patch in order to apply and test 8179

Hi Andrew, could you please try again?

Thanks

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2020-10-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #10 from Agustín Moyano  ---
Created attachment 112539
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112539=edit
Bug 26635: Expand authorised values in to_api method

This patch adds the posibility to expand authorised values when to_api
method is called.

The classes where authorised values should expand must implememnt the
_fetch_authorised_values method, and must return a hash like the
following

{
  column_name => Koha::AuthorisedValue->unblessed
  ...
}

This patch will be used in bug 8179, so please test there.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2020-10-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Agustín Moyano  changed:

   What|Removed |Added

 Attachment #111413|0   |1
is obsolete||
 Attachment #111414|0   |1
is obsolete||

--- Comment #9 from Agustín Moyano  ---
Created attachment 112538
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=112538=edit
Bug 26635: Add tests

Add tests in t/db_dependent/Koha/Object.t and
t/db_dependent/Koha/REST/Plugin/Objects.t

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2020-10-26 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Agustín Moyano  changed:

   What|Removed |Added

 Status|Patch doesn't apply |Needs Signoff

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2020-10-22 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Andrew Fuerste-Henry  changed:

   What|Removed |Added

 CC||and...@bywatersolutions.com

--- Comment #8 from Andrew Fuerste-Henry  ---
Can't apply this patch in order to apply and test 8179

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2020-10-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Nicolas Legrand  changed:

   What|Removed |Added

 CC||severine.que...@bulac.fr

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2020-10-19 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Nicolas Legrand  changed:

   What|Removed |Added

 Status|Needs Signoff   |Patch doesn't apply
 CC||nicolas.legr...@bulac.fr

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2020-10-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Agustín Moyano  changed:

   What|Removed |Added

 Attachment #111411|0   |1
is obsolete||
 Attachment #111412|0   |1
is obsolete||

--- Comment #6 from Agustín Moyano  ---
Created attachment 111413
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111413=edit
Bug 26635: Add tests

Add tests in t/db_dependent/Koha/Object.t and
t/db_dependent/Koha/REST/Plugin/Objects.t

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2020-10-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #7 from Agustín Moyano  ---
Created attachment 111414
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111414=edit
Bug 26635: Expand authorised values in to_api method

This patch adds the posibility to expand authorised values when to_api
method is called.

The classes where authorised values should expand must implememnt the
_fetch_authorised_values method, and must return a hash like the
following

{
  column_name => Koha::AuthorisedValue->unblessed
  ...
}

This patch will be used in bug 8179, so please test there.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2020-10-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Agustín Moyano  changed:

   What|Removed |Added

 Attachment #111401|0   |1
is obsolete||

--- Comment #4 from Agustín Moyano  ---
Created attachment 111411
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111411=edit
Bug 26635: Add tests

Add tests in t/db_dependent/Koha/Object.t

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2020-10-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Agustín Moyano  changed:

   What|Removed |Added

 Attachment #111402|0   |1
is obsolete||

--- Comment #5 from Agustín Moyano  ---
Created attachment 111412
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111412=edit
Bug 26635: Expand authorised values in to_api method

This patch adds the posibility to expand authorised values when to_api
method is called.

The classes where authorised values should expand must implememnt the
_fetch_authorised_values method, and must return a hash like the
following

{
  column_name => Koha::AuthorisedValue->unblessed
  ...
}

This patch will be used in bug 8179, so please test there.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2020-10-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #3 from Agustín Moyano  ---
Created attachment 111402
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111402=edit
Bug 26635: Expand authorised values in to_api method

This patch adds the posibility to expand authorised values when to_api
method is called.

The classes where authorised values should expand must implememnt the
_fetch_authorised_values method, and must return a hash like the
following

{
  column_name => Koha::AuthorisedValue->unblessed
  ...
}

This patch will be used in bug 8179, so please test there.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2020-10-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Agustín Moyano  changed:

   What|Removed |Added

 Attachment #111400|0   |1
is obsolete||

--- Comment #2 from Agustín Moyano  ---
Created attachment 111401
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111401=edit
Bug 26635: Add tests

Add tests in t/db_dependent/Koha/Object.t

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2020-10-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

--- Comment #1 from Agustín Moyano  ---
Created attachment 111400
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=111400=edit
Bug 26635: Expand authorised values in to_api method

This patch adds the posibility to expand authorised values when to_api
method is called.

The classes where authorised values should expand must implememnt the
_fetch_authorised_values method, and must return a hash like the
following

{
  column_name => Koha::AuthorisedValue->unblessed
  ...
}

This patch will be used in bug 8179, so please test there.

-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2020-10-09 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Agustín Moyano  changed:

   What|Removed |Added

   Patch complexity|--- |Trivial patch
 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
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2020-10-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Agustín Moyano  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
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2020-10-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Agustín Moyano  changed:

   What|Removed |Added

 Blocks||26636


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26636
[Bug 26636] New objects.find mojolicious helper
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/


[Koha-bugs] [Bug 26635] Expand authorised values in REST API call

2020-10-08 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26635

Agustín Moyano  changed:

   What|Removed |Added

 Blocks||8179


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8179
[Bug 8179] Receiving multiple order lines at once
-- 
You are receiving this mail because:
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
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/