Possibly because of a timing issue when the patches for bug 29695 were merged, "title" is no longer listed as an option on the value list for OPACSuggestionMandatoryFields. As a consequence, if that system preference is set to any non-default value, it becomes impossible to have the title field be mandatory on the OPAC purchase suggestion form.
Created attachment 140963 [details] [review] Bug 31619: add title back to list of OPACSuggestionMandatoryFields options This patch fixes a regression introduced by bug 29695 that prevented setting the title as a required field when setting the OPACSuggestionMandatoryFields to a non-default value. To test: [1] Set OPACSuggestionMandatoryFields in the system preferences editor and note that 'title' is not listed in the modal that is displayed. [2] Apply the patch. [3] Revist the system preference editor and note that 'title' is now displayed as an option. Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
The patch adds the title to the list of fields and is in red, however it can't be made optional - that is, it is still mandatory. Happy to sign off if this is what is intended.
I confirm that that is intended behavior - see commit 432f296b965 for bug 26296. (Also, with the possible exception of asking the library to buy a piece of equipment, most anything a patron would ask a library to purchase would have a title at minimum.)
(In reply to Galen Charlton from comment #3) > I confirm that that is intended behavior - see commit 432f296b965 for bug > 26296. (Also, with the possible exception of asking the library to buy a > piece of equipment, most anything a patron would ask a library to purchase > would have a title at minimum.) Thanks Galen for clarifying. Sign off on the way!
Created attachment 141039 [details] [review] Bug 31619: add title back to list of OPACSuggestionMandatoryFields options This patch fixes a regression introduced by bug 29695 that prevented setting the title as a required field when setting the OPACSuggestionMandatoryFields to a non-default value. To test: [1] Set OPACSuggestionMandatoryFields in the system preferences editor and note that 'title' is not listed in the modal that is displayed. [2] Apply the patch. [3] Revist the system preference editor and note that 'title' is now displayed as an option. Signed-off-by: Galen Charlton <gmc@equinoxOLI.org> Signed-off-by: David Nind <david@davidnind.com>
Thanks for your patch, Galen. Note that title does not belong to biblioitems, but to biblio. And that the pref explains that title is always mandatory and therefore not listed. You cannot deselect it. So we either skip this change or move the explanation to the popup form somehow?
(In reply to Marcel de Rooy from comment #6) > Thanks for your patch, Galen. > Note that title does not belong to biblioitems, but to biblio. The patch adds an entry for "title" as a column in the suggestions table, not biblio nor biblioitems. > And that the pref explains that title is always mandatory and therefore not > listed. You cannot deselect it. > So we either skip this change or move the explanation to the popup form > somehow? Without the patch, any attempt to change the value of OPACSuggestionMandatoryFields to a non-default value will cause the title to not be marked as required; the "title" field is not permanently considered required by the code that reads the value of the system preference unless that preference value is blank. Setting status back to signed off and requesting re-review.
(In reply to Galen Charlton from comment #7) > The patch adds an entry for "title" as a column in the suggestions table, > not biblio nor biblioitems. Ah, you are right. I just stumbled over an earlier occurrence in the wrong place (i.e. biblioitems). Sorry for that.
Created attachment 141478 [details] [review] Bug 31619: add title back to list of OPACSuggestionMandatoryFields options This patch fixes a regression introduced by bug 29695 that prevented setting the title as a required field when setting the OPACSuggestionMandatoryFields to a non-default value. To test: [1] Set OPACSuggestionMandatoryFields in the system preferences editor and note that 'title' is not listed in the modal that is displayed. [2] Apply the patch. [3] Revist the system preference editor and note that 'title' is now displayed as an option. Signed-off-by: Galen Charlton <gmc@equinoxOLI.org> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Gotta say... I'm really happy to push a patch from you, Galen :-D
Pushed to master for 22.11. Nice work everyone, thanks!
Backported to 22.05.x for upcoming 22.05.08
Koha/Database/Columns.pm doesn't exist on 21.11. Patch doesn't apply here (not needed most probably)