Bug 29311 - Do not allow editing of bibliographic information when entering suggestion from existing bibs
Summary: Do not allow editing of bibliographic information when entering suggestion fr...
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jérémy Breuillard
QA Contact: Testopia
URL:
Keywords:
Depends on: 29416 14963
Blocks:
  Show dependency treegraph
 
Reported: 2021-10-22 20:07 UTC by Andrew Fuerste-Henry
Modified: 2022-05-06 09:38 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 29311: Do not allow editing of bibliographic information when entering suggestion from existing bibs (8.40 KB, patch)
2022-04-08 13:01 UTC, Jérémy Breuillard
Details | Diff | Splinter Review
Bug 29311: Do not allow editing of bibliographic information when entering suggestion from existing bibs (8.50 KB, patch)
2022-05-03 12:06 UTC, Séverine Queune
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Fuerste-Henry 2021-10-22 20:07:43 UTC
When a patron makes a suggestion from an existing bib, the patron is allowed to edit the bibliographic information in the suggestion. This leads to confusion, since the suggestion is still tied to the original bib.

To recreate:
- find a record in the OPAC
- click Suggest for Purchase
- delete the title, author, ISBN, etc that have been pre-populated from the original bib
- fill out a suggestion for an entirely different book
- submit
- go to your purchase suggestion in your account on the OPAC. See the title you entered, observe it links to the bib you started from
- go over to the staff side and Accept your suggestion
- put your suggestion into a basket
- observe your order is for the original bib but your suggestion still shows the new title

The simplest answer I see here is to just not allowing editing of those fields when making a suggestion from an existing title.
Comment 1 Jérémy Breuillard 2022-04-08 13:01:33 UTC
Created attachment 133120 [details] [review]
Bug 29311: Do not allow editing of bibliographic information when entering suggestion from existing bibs

This patch changes the behavior of the suggestion form in OPAC. The suggestion form for an existing record has its total of inputs limited, otherwise the inputs are all available.

Test plan:
1)OPAC: Login to your OPAC account
2)Choose a record and get onto its details page
3)Click 'suggest for purchase'
4)Notice: all the fields can be modified
5)Apply patch
6)Repeat 2) and 3) or refresh
7)You see that the fields about bibliographic informations are disabled now
Comment 2 Séverine Queune 2022-05-03 12:06:20 UTC
Created attachment 134531 [details] [review]
Bug 29311: Do not allow editing of bibliographic information when entering suggestion from existing bibs

This patch changes the behavior of the suggestion form in OPAC. The suggestion form for an existing record has its total of inputs limited, otherwise the inputs are all available.

Test plan:
1)OPAC: Login to your OPAC account
2)Choose a record and get onto its details page
3)Click 'suggest for purchase'
4)Notice: all the fields can be modified
5)Apply patch
6)Repeat 2) and 3) or refresh
7)You see that the fields about bibliographic informations are disabled now

Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr>
Comment 3 Séverine Queune 2022-05-03 12:10:34 UTC
Thank you Jérémy, everything seems to work as expected, I didn't notice strange behaviours
Maybe just a tiny modification could be done when using OPACSuggestionMandatoryFields syspref : as field can't be modified, could the 'Required' mention be hidden ?
Comment 4 Katrin Fischer 2022-05-06 09:32:18 UTC
Looking here
Comment 5 Katrin Fischer 2022-05-06 09:38:18 UTC
Hi Jeremy,

Why do we not disable the form fields in the template instead of relying on the JavaScript do do it? 

And I think that would also work with Severine's request, as we then could and shoudl remove the class="required" in the form.

+                                                [% IF ( biblionumber ) %]
+                                                    <label for="publishercode" class="required">Publisher:</label>
+                                                    [% publishercode | html %]
+                                                [% ELSIF ( publishercode_required ) %]


I feel like class="required" should be removed here?