Bug 35575

Summary: Acquisition framework fails to display required next 942 $c when defined as mandatory
Product: Koha Reporter: Esther Melander <esther.melander>
Component: AcquisitionsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: angela.berrett
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Esther Melander 2023-12-14 20:39:15 UTC
To recreate

1. Ensure the acquisition framework includes the 942 $C. Mark this field as mandatory.
2. Add to basket from a new record (or other method)
3. See the Item type drop down does not display required.

With the 942 $C included in the framework, the item type displays the first alphabetically listed option, which may be wrong if the correct option is not selected. In a way this makes the field "required" by default. There is no "blank" option.

Is having the first option pre-selected by default desired behavior? Should it default to a blank option instead? Further, if a field is marked as mandatory, shouldn't there be a Required in red next to the field.
Comment 1 Katrin Fischer 2023-12-14 22:15:03 UTC
Hi Esther, are you using  UseACQFrameworkForBiblioRecords or is this about the hardcoded form?
Comment 2 Esther Melander 2023-12-15 16:41:43 UTC
This is with the hardcoded form. Enabling the system preference UseACQFrameworkForBiblioRecords, does show the 942 $c as required. This does ask the question, should there be a hardcoded form? Can the hardcoded form reference the framework? And if it continues, can functionality be added to customize it or would it overlap with the customization option of switching to the Acquisitions Framework as a system preference?
Comment 3 Katrin Fischer 2023-12-16 13:20:05 UTC
The hardcoded form cannot be configured using the frameworks or at all. It predates the option to use the ACQ framework. Because the latter requires some it hasn't fully replaced the hardcoded form on introduction, I guess.

I think making the hardcoded one configurable through frameworks would not be he right way, but maybe we could think about fully replacing it (making the framework one a little prettier) or making it configurable through preferences?
Comment 4 Angela Berrett 2023-12-22 18:03:01 UTC
We would like to see the ability to configure this hardcoded form as well.  Mainly, the ability to apply the item templates to this form so it can autofill certain fields when the item is created from here.  This may be a completely different issue, but we have talked about other changes we would appreciate the ability to make.
Comment 5 Katrin Fischer 2023-12-23 11:19:08 UTC
(In reply to Angela Berrett from comment #4)
> We would like to see the ability to configure this hardcoded form as well. 
> Mainly, the ability to apply the item templates to this form so it can
> autofill certain fields when the item is created from here.  This may be a
> completely different issue, but we have talked about other changes we would
> appreciate the ability to make.

Hi Angela, if you set your defaults for 952 in the ACQ framework this should already work. The item form is completely configurable, only the part for the bibliographic data is hardcoded if not using UseACQFrameworkForBiblioRecords.
Comment 6 Angela Berrett 2023-12-27 15:29:26 UTC
(In reply to Katrin Fischer from comment #5)
> (In reply to Angela Berrett from comment #4)
> > We would like to see the ability to configure this hardcoded form as well. 
> > Mainly, the ability to apply the item templates to this form so it can
> > autofill certain fields when the item is created from here.  This may be a
> > completely different issue, but we have talked about other changes we would
> > appreciate the ability to make.
> 
> Hi Angela, if you set your defaults for 952 in the ACQ framework this should
> already work. The item form is completely configurable, only the part for
> the bibliographic data is hardcoded if not using
> UseACQFrameworkForBiblioRecords.

We have a few different item templates we use, so setting a single default for all items created via the ACQ framework isn't quite right.  I think this is a totally different issue and I'll need to open a different ticket for it.  Thanks for answering my question here.