Bug 16424 - Advanced editor reverts records back to Default framework
Summary: Advanced editor reverts records back to Default framework
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal with 40 votes (vote)
Assignee: Ere Maijala
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on: 11559
Blocks: 21365
  Show dependency treegraph
 
Reported: 2016-05-02 21:25 UTC by verolencinas
Modified: 2019-10-14 19:56 UTC (History)
10 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Who signed the patch off:
Text to go in the release notes:
After this patch, frameworks will be handled correctly by the advanced cataloguing editor.
Version(s) released in:


Attachments
Bug 16424: Add framework support to advanced MARC editor (103.42 KB, patch)
2018-09-16 18:40 UTC, Ere Maijala
Details | Diff | Splinter Review
Bug 16424: Make the svc/bib service keep the existing framework code (984 bytes, patch)
2018-09-16 18:41 UTC, Ere Maijala
Details | Diff | Splinter Review
Bug 16424: Add framework support to advanced MARC editor (17.58 KB, patch)
2018-09-16 21:43 UTC, Ere Maijala
Details | Diff | Splinter Review
Bug 16424: Minor CSS change for the advanced editor Settings menu (887 bytes, patch)
2018-09-16 21:43 UTC, Ere Maijala
Details | Diff | Splinter Review
Bug 16424: Make the svc/bib service keep the existing framework code (984 bytes, patch)
2018-09-16 21:43 UTC, Ere Maijala
Details | Diff | Splinter Review
Bug 16424: Handle framework code properly also when adding a new record (2.99 KB, patch)
2018-09-16 22:06 UTC, Ere Maijala
Details | Diff | Splinter Review
Bug 16424: Update default values in advanced editor when changing frameworks. (5.23 KB, patch)
2018-09-16 22:20 UTC, Ere Maijala
Details | Diff | Splinter Review
Bug 16424: Add framework support to advanced MARC editor (17.54 KB, patch)
2018-09-24 11:55 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 16424: Minor CSS change for the advanced editor Settings menu (979 bytes, patch)
2018-09-24 11:55 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 16424: Make the svc/bib service keep the existing framework code (1.05 KB, patch)
2018-09-24 11:55 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 16424: Handle framework code properly also when adding a new record (3.08 KB, patch)
2018-09-24 11:55 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 16424: Update default values in advanced editor when changing frameworks. (5.30 KB, patch)
2018-09-24 11:55 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 16424: Add framework support to advanced MARC editor (17.55 KB, patch)
2018-09-27 13:15 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 16424: Minor CSS change for the advanced editor Settings menu (993 bytes, patch)
2018-09-27 13:15 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 16424: Make the svc/bib service keep the existing framework code (1.07 KB, patch)
2018-09-27 13:15 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 16424: Handle framework code properly also when adding a new record (3.10 KB, patch)
2018-09-27 13:15 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 16424: Update default values in advanced editor when changing frameworks. (5.32 KB, patch)
2018-09-27 13:15 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 16424: (QA follow-up) Use Modern::Perl (710 bytes, patch)
2018-09-27 13:16 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 16424: (follow-up) remove wrong copyright statements (681 bytes, patch)
2018-09-29 19:55 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description verolencinas 2016-05-02 21:25:37 UTC
If you use the new advanced editor in the cataloging module, all records lose their framework information and revert to the Default framework. Since frameworks permit to change vocabulary and presence of fields/subfields in the OPAC, this should be fixed.
Comment 1 Ere Maijala 2018-09-16 18:40:55 UTC
Created attachment 78977 [details] [review]
Bug 16424: Add framework support to advanced MARC editor

Keeps the selected framework, allows selecting another and validates the record using the correct framework. Contains additional minor tweaks to display proper error messages.

To test:
1. Add a record with a non-default framework in the basic editor.
2. Switch to advanced editor and make sure the settings menu displays the correct framework.
3. Save the record and confirm that the framework code did not change.
4. Change the framework and save the record again.
5. Verify that the framework code changed.
6. Change one framework to make an extra field mandatory.
7. Make sure that the field is required in the editor when the framework above is selected but not when another framework is selected.
Comment 2 Ere Maijala 2018-09-16 18:41:03 UTC
Created attachment 78978 [details] [review]
Bug 16424: Make the svc/bib service keep the existing framework code

Previously the framework code would have been reset when the record was saved, but that seems to have been a mistake.
Comment 3 Ere Maijala 2018-09-16 18:42:10 UTC
The first patch contains the actual functionality. The second one is not necessary for this to work, but fixes the issue that was an apparent bug in the service.
Comment 4 Jonathan Druart 2018-09-16 19:35:33 UTC
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/css/staff-global.css

Ere, changes to .css should not be committed to avoid such conflicts. It may be better to have a step to the test plan to remind testers to regenerate it. If you want it to be testable in a sandbox you can provide the css changes on a separate patch (to ease rebase and QA)
Comment 5 Ere Maijala 2018-09-16 21:43:19 UTC
Created attachment 79009 [details] [review]
Bug 16424: Add framework support to advanced MARC editor

Keeps the selected framework, allows selecting another and validates the record using the correct framework. Contains additional minor tweaks to display proper error messages.

To test:
1. Add a record with a non-default framework in the basic editor.
2. Switch to advanced editor and make sure the settings menu displays the correct framework.
3. Save the record and confirm that the framework code did not change.
4. Change the framework and save the record again.
5. Verify that the framework code changed.
6. Change one framework to make an extra field mandatory.
7. Make sure that the field is required in the editor when the framework above is selected but not when another framework is selected.
Comment 6 Ere Maijala 2018-09-16 21:43:25 UTC
Created attachment 79010 [details] [review]
Bug 16424: Minor CSS change for the advanced editor Settings menu
Comment 7 Ere Maijala 2018-09-16 21:43:32 UTC
Created attachment 79011 [details] [review]
Bug 16424: Make the svc/bib service keep the existing framework code

Previously the framework code would have been reset when the record was saved, but that seems to have been a mistake.
Comment 8 Ere Maijala 2018-09-16 21:44:50 UTC
Ok, moved the css change to a separate patch. Please remember to regenerate css when testing to make the settings menu in the advanced editor look good.
Comment 9 Ere Maijala 2018-09-16 22:06:39 UTC
Created attachment 79017 [details] [review]
Bug 16424: Handle framework code properly also when adding a new record
Comment 10 Ere Maijala 2018-09-16 22:20:29 UTC
Created attachment 79022 [details] [review]
Bug 16424: Update default values in advanced editor when changing frameworks.
Comment 11 Michal Denar 2018-09-24 11:01:13 UTC
Hi Ere,
I'm testing this patch. But at point 
7. Make sure that the field is required in the editor when the framework above is selected but not when another framework is selected I don't see any changes.
Short video is more than thousands words: http://recordit.co/qAwNt4BQtd

Is necessary to save record between change of framework?

Thank You

Mike
Comment 12 Ere Maijala 2018-09-24 11:28:39 UTC
Hi Michal,
Thanks for testing. Validation is only done when the record is saved, so you won't see notification about missing fields until you try to save the record. If you are able to save the record without errors after selecting a framework that requires a field that the record does not contain, there's an error. I couldn't tell from the video since I don't know for sure which fields are required in the frameworks you used.
Comment 13 Michal Denar 2018-09-24 11:53:58 UTC
Ere,
thank You for explanation. I tried ot again and Rancor works as You describe.

Good work.

Mike
Comment 14 Michal Denar 2018-09-24 11:55:14 UTC
Created attachment 79294 [details] [review]
Bug 16424: Add framework support to advanced MARC editor

Keeps the selected framework, allows selecting another and validates the record using the correct framework. Contains additional minor tweaks to display proper error messages.

To test:
1. Add a record with a non-default framework in the basic editor.
2. Switch to advanced editor and make sure the settings menu displays the correct framework.
3. Save the record and confirm that the framework code did not change.
4. Change the framework and save the record again.
5. Verify that the framework code changed.
6. Change one framework to make an extra field mandatory.
7. Make sure that the field is required in the editor when the framework above is selected but not when another framework is selected.

Signed-off-by: Michal Denar <black23@gmail.com>
Comment 15 Michal Denar 2018-09-24 11:55:20 UTC
Created attachment 79295 [details] [review]
Bug 16424: Minor CSS change for the advanced editor Settings menu

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Your Full Name <your_email>
Comment 16 Michal Denar 2018-09-24 11:55:25 UTC
Created attachment 79296 [details] [review]
Bug 16424: Make the svc/bib service keep the existing framework code

Previously the framework code would have been reset when the record was saved, but that seems to have been a mistake.

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Your Full Name <your_email>
Comment 17 Michal Denar 2018-09-24 11:55:30 UTC
Created attachment 79297 [details] [review]
Bug 16424: Handle framework code properly also when adding a new record

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Your Full Name <your_email>
Comment 18 Michal Denar 2018-09-24 11:55:36 UTC
Created attachment 79298 [details] [review]
Bug 16424: Update default values in advanced editor when changing frameworks.

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Your Full Name <your_email>
Comment 19 Katrin Fischer 2018-09-27 13:15:23 UTC
Created attachment 79499 [details] [review]
Bug 16424: Add framework support to advanced MARC editor

Keeps the selected framework, allows selecting another and validates the record using the correct framework. Contains additional minor tweaks to display proper error messages.

To test:
1. Add a record with a non-default framework in the basic editor.
2. Switch to advanced editor and make sure the settings menu displays the correct framework.
3. Save the record and confirm that the framework code did not change.
4. Change the framework and save the record again.
5. Verify that the framework code changed.
6. Change one framework to make an extra field mandatory.
7. Make sure that the field is required in the editor when the framework above is selected but not when another framework is selected.

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 20 Katrin Fischer 2018-09-27 13:15:29 UTC
Created attachment 79500 [details] [review]
Bug 16424: Minor CSS change for the advanced editor Settings menu

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 21 Katrin Fischer 2018-09-27 13:15:36 UTC
Created attachment 79501 [details] [review]
Bug 16424: Make the svc/bib service keep the existing framework code

Previously the framework code would have been reset when the record was saved, but that seems to have been a mistake.

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 22 Katrin Fischer 2018-09-27 13:15:42 UTC
Created attachment 79502 [details] [review]
Bug 16424: Handle framework code properly also when adding a new record

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 23 Katrin Fischer 2018-09-27 13:15:47 UTC
Created attachment 79503 [details] [review]
Bug 16424: Update default values in advanced editor when changing frameworks.

Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 24 Katrin Fischer 2018-09-27 13:16:52 UTC
Created attachment 79504 [details] [review]
Bug 16424: (QA follow-up) Use Modern::Perl
Comment 25 Nick Clemens 2018-09-28 19:53:54 UTC
Awesome work all!

Pushed to master for 18.11
Comment 26 Jonathan Druart 2018-09-29 19:54:06 UTC
Copyright is wrong in svc/bib_framework
Comment 27 Jonathan Druart 2018-09-29 19:55:27 UTC
Created attachment 79621 [details] [review]
Bug 16424: (follow-up) remove wrong copyright statements
Comment 28 Martin Renvoize 2018-10-03 09:15:33 UTC
Marking this as an enhancement as although I do agree it's an important issue to be resolved, it would be an unexpected change for existing users on the stable branches.