items.stack is not included at /api/v1/items/ I think it should be
Created attachment 170299 [details] [review] Bug 37639: Add items.stack to items endpoint To test: 1. Apply patch and restart_all 2. Check the items endpoint for items.stack ( http://localhost:8081/api/v1/items/144 ) 3. The data is there, and correct.
Created attachment 170328 [details] [review] Bug 37639: Add items.stack to items endpoint To test: 1. Apply patch and restart_all, and yarn api:bundle 2. Check the items endpoint for items.stack ( http://localhost:8081/api/v1/items/144 ) 3. The data is there, and correct.
Created attachment 170329 [details] [review] Bug 37639: (follow-up) Remove stack from API mapping Shouldn't need to define stack in to_api_mapping because the name isn't changing.
Created attachment 170396 [details] [review] Bug 37639: Add items.stack to items endpoint To test: 1. Apply patch and restart_all, and yarn api:bundle 2. Check the items endpoint for items.stack ( http://localhost:8081/api/v1/items/144 ) 3. The data is there, and correct. Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Created attachment 170397 [details] [review] Bug 37639: (follow-up) Remove stack from API mapping Shouldn't need to define stack in to_api_mapping because the name isn't changing. Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
Why is items.stack the only column in items that doesn't have a comment in kohastructure.pl?
(In reply to Paul Derscheid from comment #6) > Why is items.stack the only column in items that doesn't have a comment in > kohastructure.pl? It's a good question. There should be more info. on what it is. I had to ask around to find out. It is also one of the only ones without POD in Koha/Schema/Result/Item.pm
(In reply to Paul Derscheid from comment #6) > Why is items.stack the only column in items that doesn't have a comment in > kohastructure.pl? https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37653
Just feeling that it would be better to list it (skip 2nd patch). Also note: withdrawn => 'withdrawn', timestamp => 'timestamp', location => 'location', uri => 'uri', Is it possible to add a tiny test to prove the result of this change?
Created attachment 170458 [details] [review] Bug 37639: Add unit tests
> Is it possible to add a tiny test to prove the result of this change? I don't know how to write a test for my change only, so I added some for all the to_api_mappiings in Item.pm
OK.. we add it to the mapping... As people are confused about 'stack'.. should we not actually map it to something more meaningful for the API field? control_number perhaps?
(In reply to Martin Renvoize from comment #12) > OK.. we add it to the mapping... As people are confused about 'stack'.. > should we not actually map it to something more meaningful for the API field? > > control_number perhaps? I think control_number might also be a bit difficult as it reminds of the MARC 001 label. shelving_control_number maybe?
(In reply to Katrin Fischer from comment #13) > (In reply to Martin Renvoize from comment #12) > > OK.. we add it to the mapping... As people are confused about 'stack'.. > > should we not actually map it to something more meaningful for the API field? > > > > control_number perhaps? > > I think control_number might also be a bit difficult as it reminds of the > MARC 001 label. shelving_control_number maybe? I'm happy to change the patch. Is 'shelving_control_number' agreed upon?
I think Martin is not around for a few days. If you agree, maybe move on with it.
Sorry, but what exactly is this referring to?
Exposing items.stacks as shelving_control_number in the API (I believe).
Alright, I also think shelving_control_number sounds reasonable.
Sounds great to me.. it's a tiny ask but I think that would poke it into PQA for me [U+1F600]
Created attachment 170782 [details] [review] Bug 37639: Map items.stack as shelving_control_number in API