| Summary: | Additional fields are broken in Vue (values entered are not saved) | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Matt Blenkinsop <matt.blenkinsop> |
| Component: | ERM | Assignee: | Matt Blenkinsop <matt.blenkinsop> |
| Status: | Pushed to main --- | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
| Severity: | major | ||
| Priority: | P5 - low | CC: | aleisha, david, jonathan.druart, jonathan.field, lucas, martin.renvoize, matt.blenkinsop, pedro.amorim |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: |
This fixes the saving of data for additional fields for modules in Koha that use Vue (ERM, Preservation, Acquisitions). The data entered for additional fields is now saved, instead of being ignored and lost. For example, data for additional fields added to ERM agreements was not being saved, but now are.
|
Version(s) released in: |
25.11.00
|
| Circulation function: | |||
| Bug Depends on: | 38201 | ||
| Bug Blocks: | 38262 | ||
| Attachments: |
Bug 41063: Fix additional fields in Vue
Bug 41063: Allow setting of a group for additional fields Bug 41063: Allow setting of a group for additional fields Bug 41063: Allow setting of a group for additional fields Bug 41063: Fix additional fields in Vue Bug 41063: Allow setting of a group for additional fields Bug 41063: Fix additional fields in Vue Bug 41063: Allow setting of a group for additional fields |
||
|
Description
Matt Blenkinsop
2025-10-21 12:15:24 UTC
Created attachment 188212 [details] [review] Bug 41063: Fix additional fields in Vue Test plan: 1) Go to Administration > Additional fields and add an additional field for erm_agreements 2) Enable ERM and navigate to ERM > Agreements 3) Click to add a new agreement and then fill out the form, making sure to add something into your new additional field 4) Hit save and navigate to the agreement you have just added 5) There will be no additional field added 6) Apply patch and yarn js:build 7) Repeat steps 3 - 5 8) The additional field should be added and displayed correctly Created attachment 188216 [details] [review] Bug 41063: Allow setting of a group for additional fields Created attachment 188228 [details] [review] Bug 41063: Allow setting of a group for additional fields Created attachment 188363 [details] [review] Bug 41063: Allow setting of a group for additional fields Created attachment 188389 [details] [review] Bug 41063: Fix additional fields in Vue Test plan: 1) Go to Administration > Additional fields and add an additional field for erm_agreements 2) Enable ERM and navigate to ERM > Agreements 3) Click to add a new agreement and then fill out the form, making sure to add something into your new additional field 4) Hit save and navigate to the agreement you have just added 5) There will be no additional field added 6) Apply patch and yarn js:build 7) Repeat steps 3 - 5 8) The additional field should be added and displayed correctly Signed-off-by: David Nind <david@davidnind.com> Created attachment 188390 [details] [review] Bug 41063: Allow setting of a group for additional fields Signed-off-by: David Nind <david@davidnind.com> I changed the status to major (from enhancement) and added a release note. I followed the test plan and tried restarting services, but my additional field never showed up and wasn't saved in my agreement. It still works for me when applying on main - you might need a hard refresh of the browser to rule out caching of the pre-existing javascript if you didn't try that? Created attachment 188752 [details] [review] Bug 41063: Fix additional fields in Vue Additional fields added through Vue.js resource forms were not being saved to the database. This was caused by using ref() instead of reactive() for the current_additional_fields_values object. Since ref() only provides shallow reactivity for objects, changes to nested properties were not being tracked properly. This switches to reactive() which provides deep reactivity tracking, ensuring that all changes to additional field values are properly captured and submitted when the form is saved. Test plan: 1) Go to Administration > Additional fields and add an additional field for erm_agreements 2) Enable ERM and navigate to ERM > Agreements 3) Click to add a new agreement and then fill out the form, making sure to add something into your new additional field 4) Hit save and navigate to the agreement you have just added 5) There will be no additional field added 6) Apply patch and yarn js:build 7) Repeat steps 3 - 5 8) The additional field should be added and displayed correctly Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Created attachment 188753 [details] [review] Bug 41063: Allow setting of a group for additional fields Adds support for the extendedAttributesFieldGroup configuration option in base-resource.js composable. This allows developers to specify which form section/group additional fields should appear in, providing better control over form organization and UX. Without this, additional fields always appeared in the default group, making it difficult to logically organize complex forms with multiple field groupings. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> I tested with all additional field types available and all worked as expected for me.. I couldn't replicate Aliesha's issues. Passing QA Nice work everyone! Pushed to main for 25.11 |