The `_status` method has a couple problems: * It doesn't have a POD * It returns a string! It should return a list instead, so handling on the UI doesn't require splitting the string back. That said, the tests using it in the UI (Holdings_spec.ts) only test the `available` rendering use case. This is minor.
I think this should be fixed for the release.
Created attachment 182598 [details] [review] Bug 39932: Make Koha::Item->_status return an arrayref This patch makes the method return an actual array instead of a comma-separated string. The API spec is adjusted so it also expects an array in the response. Tests are adjusted for the new return value. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ yarn api:bundle k$ prove t/db_dependent/Koha/Item.t => SUCCESS: Tests pass! 3. Sign off :-D
Created attachment 182599 [details] [review] Bug 39932: Add POD for Koha::Item->_status() Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 182600 [details] [review] Bug 39932: Remove split in template
I marked it as Major to get more attention. I think the API spec is the most sensible issue here, as people could start using the 'string value' once it is published.
Created attachment 182605 [details] [review] Bug 39932: Make Koha::Item->_status return an arrayref This patch makes the method return an actual array instead of a comma-separated string. The API spec is adjusted so it also expects an array in the response. Tests are adjusted for the new return value. To test: 1. Apply this patch 2. Run: $ ktd --shell k$ yarn api:bundle k$ prove t/db_dependent/Koha/Item.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: David Nind <david@davidnind.com>
Created attachment 182606 [details] [review] Bug 39932: Add POD for Koha::Item->_status() Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com>
Created attachment 182607 [details] [review] Bug 39932: Remove split in template Signed-off-by: David Nind <david@davidnind.com>