https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42825

            Bug ID: 42825
           Summary: ERM Local Title - Start date (started_on) not saved
                    for package resources
   Initiative type: ---
        Sponsorship ---
            status:
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: ERM
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected],
                    [email protected],
                    [email protected],
                    [email protected],
                    [email protected]
  Target Milestone: ---

When editing a local ERM Title and linking it to a package, the Start date
(started_on) field is not saved — it remains empty after saving and reopening
the record. The End date (ended_on) and Proxy fields save correctly.

Steps to reproduce:

1 Go to ERM > eHoldings > Local > Titles
2 Create or edit a local title
3 Link it to at least one package and enter a Start date (and optionally an End
date and Proxy)
4 Save
5 Reopen the title — Start date is empty; End date and Proxy are saved
correctly

The root cause of the error:

In
koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/EHoldingsLocalTitleResource.vue,
the started_on field inside relationshipFields is missing indexRequired: true.
This property causes the form system to generate a unique DOM id per row (e.g.
started_on_0) and passes the row index to the component. Without it, the id
stays as started_on, breaking the reactive binding between the flatpickr input
and the Vue data model.

The ended_on field does not have componentProps, so it is not affected. The
started_on field does have componentProps.date_to which alters how the
component id is expected to be resolved, making it the only field that fails
without indexRequired.

Additionally, calendar.inc throws a TypeError: Cannot read properties of null
(reading '_flatpickr') in the browser console when selecting a start date,
because the date_to componentProp references ended_on without the row index
suffix.

See also: Bug 42536 — while investigating why the Proxy field was not displayed
in the resource view, the missing Start date in the edit form was identified as
a related but separate issue in the same component
(EHoldingsLocalTitleResource.vue).

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to