We should add additional fields capability to Vendors following the Vue migration
Created attachment 175147 [details] [review] Bug 38262: Update API specs
Created attachment 175148 [details] [review] Bug 38262: Update object classes
Created attachment 175149 [details] [review] Bug 38262: Update UI
Created attachment 175712 [details] [review] Bug 38262: Update API specs
Created attachment 175713 [details] [review] Bug 38262: Update object classes
Created attachment 175714 [details] [review] Bug 38262: Update UI
Could you add a test plan please?
Patch doesn't apply Error message says Patch failed at 0001 Bug 38262: Update API specs
Created attachment 180558 [details] [review] Bug 38262: Update API specs
Created attachment 180559 [details] [review] Bug 38262: Update object classes
Created attachment 180560 [details] [review] Bug 38262: Update UI
Test plan to follow, updating the bug dependencies first
Created attachment 182602 [details] [review] Bug 38262: Update API specs
Created attachment 182603 [details] [review] Bug 38262: Update object classes
Created attachment 182604 [details] [review] Bug 38262: Update UI
Created attachment 183026 [details] [review] Bug 38262: Update API specs Signed-off-by: David Nind <david@davidnind.com>
Created attachment 183027 [details] [review] Bug 38262: Update object classes Signed-off-by: David Nind <david@davidnind.com>
Created attachment 183028 [details] [review] Bug 38262: Update UI Signed-off-by: David Nind <david@davidnind.com>
Created attachment 183029 [details] [review] Bug 38262: Update API specs Signed-off-by: David Nind <david@davidnind.com>
Created attachment 183030 [details] [review] Bug 38262: Update object classes Signed-off-by: David Nind <david@davidnind.com>
Created attachment 183031 [details] [review] Bug 38262: Update UI Signed-off-by: David Nind <david@davidnind.com>
Testing notes (using KTD): 1. Apply the patch 2. Rebuild everything: yarn build 3. Restart everything: restart_all 4. Go to Koha administration > Additional parameters > Additional fields. 5. Under the additional fields for acquisitions, note that there is a new option: Vendors (aqbooksellers:vendor). 6. Add two new fields for vendors: - a text field - a field linked to an authorized value category, for example YES_NO 7. Edit an existing vendor (My Vendor) to add values for the additional fields you created. 8. Note that these are shown in a new section on the vendor details page, "Additional fields". 9. Add a new vendor, and add a value for only one of the additional fields. 10. Note that on the vendor details page, only additional fields that have a value are shown.
*** Bug 28218 has been marked as a duplicate of this bug. ***
Can we get a rebase here now that the blocker vue bug is in?
Created attachment 188213 [details] [review] Bug 38262: Update API specs Signed-off-by: David Nind <david@davidnind.com>
Created attachment 188214 [details] [review] Bug 38262: Update object classes Signed-off-by: David Nind <david@davidnind.com>
Created attachment 188215 [details] [review] Bug 38262: Update UI Signed-off-by: David Nind <david@davidnind.com>
Created attachment 188364 [details] [review] Bug 38262: Update UI Signed-off-by: David Nind <david@davidnind.com>
Created attachment 188366 [details] [review] Bug 38262: Update UI Signed-off-by: David Nind <david@davidnind.com>
Created attachment 188377 [details] [review] Bug 38262: Update UI Signed-off-by: David Nind <david@davidnind.com>
Created attachment 188384 [details] [review] Bug 38262: Update API specs Signed-off-by: David Nind <david@davidnind.com>
Created attachment 188385 [details] [review] Bug 38262: Update object classes Signed-off-by: David Nind <david@davidnind.com>
Created attachment 188386 [details] [review] Bug 38262: Update UI Signed-off-by: David Nind <david@davidnind.com>
Some minor things I noticed during sign off - see screenshots attached separately: 1. When entering repeatable fields for a vendor, there is no spacing between the Clear and + New buttons. 2. In the list of vendors, repeatable fields uses a comma to separate values, instead of listing on separate lines. 3. On the vendor details page, the alignment of the additional field labels and values doesn't look quite right to me. Note for documentation, for repeatable fields it uses the updated select field input form to add multiple values for a field.
Created attachment 188388 [details] Screenshots for Bug 38262 – Additional fields for vendors
I agree with David, whilst the functionality works we have some UX improvements to make/bugs to fix. The 'Clear' and 'New' spacing does look odd and could be improved upon.. I also find that clicking 'New' next to a field clone that field AND it's content to a new field.. I think this should create a new empty repeatable field input instead. I think both of these things should be handled on their own bug however.
Created attachment 188754 [details] [review] Bug 38262: Add extended attributes support to vendors API specification Updates the OpenAPI definitions to support additional fields on vendor records. This adds: - extended_attributes array field to vendor schema definition - _strings field for localized/computed string representations - extended_attributes and +strings to available embed options These changes allow the API to expose and accept additional field data when retrieving or modifying vendor records via the REST API. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Created attachment 188755 [details] [review] Bug 38262: Enable additional fields support for acquisition vendors Implements backend support for additional fields on vendor records by: - Adding AdditionalFields mixin to Bookseller/Booksellers classes - Defining additional_field_values and extended_attributes relationships in Aqbookseller schema with proper table name filtering - Updating REST API controller to handle extended_attributes during vendor creation and updates - Adding vendor to AdditionalField resource type mapping This provides the ORM-level support needed for vendors to have custom additional fields, matching the existing pattern used for other resource types like agreements, packages, and orders. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Created attachment 188756 [details] [review] Bug 38262: Add additional fields UI support for acquisition vendors Updates staff interface to expose additional fields functionality for vendor records: - Adds "Vendors" (aqbooksellers:vendor) to searchable tables list in additional fields administration page - Configures VendorResource.vue to fetch extended_attributes with proper embeds (+strings for localized values) - Sets extendedAttributesFieldGroup to display fields in "Details" tab - Cleans up _strings computed field during vendor save operations This completes the frontend implementation allowing staff to create, manage, and view custom additional fields on vendor records. Test plan: 1) Go to Administration > Additional fields and add an additional field for Vendors 2) Navigate to 'Acquisitions' and click 'New vendor' 3) Fill out the form, making sure to add something into your new additional field 4) Hit save 5) View and Edit your new Vendor and confirm that the additional field values appear and update as expected Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>