When trying to update a field using a MARC modification template, it is impossible to put a value of over 100 characters. To reproduce: 1. Go to Tools > MARC modification templates 2. Click on 'New template' 3. Name your new template and click on 'Submit' 4. Click on 'New action' 5. Enter the following information in the form - 'Add new' - field(s): 856 y - with value: Organization-wide access - sign on to OnePass / Accès à l'échelle de l'organisation - Ouvrez une session (OnePass) 6. Click on Add action 7. Note that the text is cut in the displayed table 'Organization-wide access - sign on to OnePass / Accès à l'échelle de l'organisation - Ouvrez une ses' 8. Do a search to obtain a biblionumber 1. Make a search in the catalog 2. Click on the title to go to the detailed record 3. Click on the 'MARC' tab 4. The biblionumber is written next to MARC record: 5. Copy the biblionumber 9. Go to Tools > Batch record modification 10. In the 'List of biblionumbers...' text box, paste the biblionumber 11. Choose the template created at step 3 in the 'Modify record using the following template:' drop down menu 12. Click on 'Continue' 13. Click on 'Show MARC' to see the result of the modification (the added line is usually at the bottom, note that the text is still cut after 100 characters, so not only a display bug) 14. Click on 'Close' 15. Click on 'Modify selected records' 16. Click on the biblionumber to see the modified record 17. In the detailed record, the 856y field is under 'Online resources' (note that the text is still cut) I noticed that in the database, the field field_value in the table marc_modification_template_actions is limited to 100 characters.
+1
I believe marc_modification_template_actions.field_value varchar(100) might be to blame here. Should we move this up to mediumtext?
Created attachment 147020 [details] [review] Bug 22428: Change datatype of field_value to text This patch changes the datatype of the field_value column in marc_modification_template_actions to "text". This is to stop text strings longer than 100 characters from being chopped short and allow longer strings up to 65,000 characters. Test plan: 1) Follow the same steps outlined by Caroline in the problem statement 2) Apply patch 3) Follow the steps again and this time the text should upload with no problem
Created attachment 147021 [details] [review] Bug 22428: Attach DBIC file DBIC file for updated column Test plan as above
Created attachment 147074 [details] [review] Bug 22428: Change datatype of field_value to text This patch changes the datatype of the field_value column in marc_modification_template_actions to "text". This is to stop text strings longer than 100 characters from being chopped short and allow longer strings up to 65,000 characters. Test plan: 1. Create a MARC modification template with a text value over 100 characters 1.1 Go to Cataloging > MARC modification templates 1.2. Click on 'New template' 1.3. Name your new template and click on 'Submit' 1.4. Click on 'New action' 1.5. Enter the following information in the form - 'Add new' - field(s): 856 y - with value: Organization-wide access - sign on to OnePass / Accès à l'échelle de l'organisation - Ouvrez une session (OnePass) 1.6. Click on Add action --> Note that the text is cut in the displayed table 'Organization-wide access - sign on to OnePass / Accès à l'échelle de l'organisation - Ouvrez une ses' 2. Use the MARC modification template on a bibliographic record 2.1 Make a search in the catalog 2.2. Click on the title to go to the detailed record 2.3. Click 'Edit' and choose 'Modify record using template' 2.4. Choose the template from step 1 from the drop-down menu 2.5. Click on 'Show MARC' to see the result of the modification (the added line is usually at the bottom) --> Note that the text is still cut after 100 characters (so not only a display bug) 2.6. Click on 'Close' 2.7. Click on 'Modify selected records' 2.8. Click on 'View detail of the enqueued job' 2.9. Click on the biblionumber under 'Detailed messages' to see the modified record --> In the detailed record, the 856y field is under 'Online resources', note that the text is still cut 3. Apply patch, update database 4. Redo steps 1 and 2 --> On step 1.6. the text is displayed in full in the table --> On step 2.5. the text is displayed in full in the MARC preview --> On step 2.9. the text is displayed in full in the detailed record, under Online resources Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> I updated the test plan for new functionalities in master
Created attachment 147075 [details] [review] Bug 22428: Attach DBIC file DBIC file for updated column Test plan as above Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Some things had changed in master since my original test plan (some things moved, some new functionalities reduced the test plan to less steps), so I updated it a bit. I hope that's ok
Created attachment 147374 [details] [review] Bug 22428: Change datatype of field_value to text This patch changes the datatype of the field_value column in marc_modification_template_actions to "text". This is to stop text strings longer than 100 characters from being chopped short and allow longer strings up to 65,000 characters. Test plan: 1) Follow the same steps outlined by Caroline in the problem statement 2) Apply patch 3) Follow the steps again and this time the text should upload with no problem Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 147375 [details] [review] Bug 22428: Attach DBIC file DBIC file for updated column Test plan as above Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 147376 [details] [review] Bug 22428: (QA follow-up) Add exec flag to update
Pushed to master for 23.05. Nice work everyone, thanks!
Nice work, thanks everyone! Pushed to 22.11.x for the next release.
Seems to be only backend stuff, nothing to add/change in the manual.