Bug 41605

Summary: Fix incorrect default value keys in Vue
Product: Koha Reporter: Matt Blenkinsop <matt.blenkinsop>
Component: Architecture, internals, and plumbingAssignee: Matt Blenkinsop <matt.blenkinsop>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: david
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:
Version(s) released in:
Circulation function:
Attachments: Bug 41605: Fix incorrect default key

Description Matt Blenkinsop 2026-01-13 16:43:32 UTC
We should be using defaultValue instead of value to set defaults
Comment 1 Matt Blenkinsop 2026-01-13 16:45:46 UTC
Created attachment 191371 [details] [review]
Bug 41605: Fix incorrect default key

Test plan:
1) Create a new vendor, the status should be inactive by default
2) Apply patch, yarn js:build and hard refresh
3) The vendor should now default to active
Comment 2 David Nind 2026-02-28 19:20:04 UTC
When creating a new vendor (before the patch), active is already the default for the add vendor form:

1. Acquisitions > New vendor
   - Vendor name: enter a name
   - Ordering information section:
     . Vendor is: Active: X Inactive:

2. After creating the vendor, for the information shown for a vendor, the "Vendor is" field is empty/blank (shown under the ordering information section).

3. In the database, the active field is set to 1 (koha-mysql kohadev, select * from aqbooksellers;)


Looking at the code, before the patch, koha-tmpl/intranet-tmpl/prog/js/vue/components/Vendors/VendorResource.vue already uses defaultValue, so may have been changed by another bug:

 461                     defaultValue: true,

However, for koha-tmpl/intranet-tmpl/prog/js/vue/components/Admin/RecordSources/RecordSourcesResource.vue (record sources), it is still 'value' before the patch:

 62                     value: false,