Right now when you merge two bibs they have to be the same framework, I'd like to see the librarian be able to choose which framework to apply to the newly merged record instead of just stopping them from merging two records with different frameworks.
We can go three ways with this: * Take reference record framework * Pick from two records frameworks * Pick from the full list Can you please pick the most appropriate one
Could we use the full list and preselect the reference record's framework?
That is certainly possible. Do we need a confirmation on this, or shall I proceed?
I confirm that this is the way it should work. Go ahead with Katrin's idea. Nicole
Created attachment 5731 [details] [review] patch
Created attachment 5734 [details] [review] [SIGNED-OFF] bug_6210: Select framework if merging two records with different frameworks Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
New test plan found that this doesn't pass QA: Test 1: Merge two records with the same framework Desired result: shouldn't get any prompting to pick a framework, and the same framework should be used **PASSED Test 1** Test 2: 2 records, different frameworks, into the kept record's framework Desired result: merge with kept records framework used **PASSED Test 2** Test 3: 2 records, different frameworks, into the discarded record's framework Desired result: merge with used records framework used **FAILED Test 3** Test 4: 2 records, different frameworks, into a third framework Desired result: merge with third framework used **FAILED Test 4**
Created attachment 5759 [details] [review] patch
Created attachment 6245 [details] [review] patch
When repeating test #2 I get the following when trying to complete the merge: Software error: Tag "" is not a valid tag. at /home/nengard/kohaclone/C4/Biblio.pm line 3219 For help, please send mail to the webmaster (webmaster@debian), giving this error message and the time and date of the error.
Created attachment 6302 [details] [review] patch I believe that is a data issue. However, the error reporting is quite poor, so please try this patch and if the error reported is not clear please check the log file.
Test 1: Merge two records with the same framework Desired result: shouldn't get any prompting to pick a framework, and the same framework should be used **PASSED Test 1** Test 2: 2 records, different frameworks, into the kept record's framework Desired result: merge with kept records framework used **PASSED Test 2** Test 3: 2 records, different frameworks, into the discarded record's framework Desired result: merge with used records framework used **PASSED Test 3** Test 4: 2 records, different frameworks, into a third framework Desired result: merge with third framework used ** FAILED Test 4 ** After clicking 'merge' I get this - I tried to merge a books framework title and a fast add framework title in to the default framework. Software error: No biblionumber tag for framework "Default" at /home/nengard/kohaclone/C4/Biblio.pm line 3186. For help, please send mail to the webmaster (webmaster@debian), giving this error message and the time and date of the error.
Created attachment 6858 [details] [review] patch
Test 1: Merge two records with the same framework Desired result: shouldn't get any prompting to pick a framework, and the same framework should be used **PASSED Test 1** Test 2: 2 records, different frameworks, into the kept record's framework Desired result: merge with kept records framework used **PASSED Test 2** Test 3: 2 records, different frameworks, into the discarded record's framework Desired result: merge with used records framework used **PASSED Test 3** Test 4: 2 records, different frameworks, into a third framework Desired result: merge with third framework used ** PASSED Test 4 **
Created attachment 6889 [details] [review] [SIGNED-OFF] bug_6210: Select framework if merging two records with different frameworks ModBiblio() - set framework to "" if "Default" Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com> All 4 tests passed: Test 1: Merge two records with the same framework Desired result: shouldn't get any prompting to pick a framework, and the same framework should be used Test 2: 2 records, different frameworks, into the kept record's framework Desired result: merge with kept records framework used Test 3: 2 records, different frameworks, into the discarded record's framework Desired result: merge with used records framework used Test 4: 2 records, different frameworks, into a third framework Desired result: merge with third framework used
QA comments: 1- there is an unconditionnal warn: warn qq{No marc tags for framework "$frameworkcode" field $kohafield}; 2- strengthen/clean the code on some subs by: - testing input parameters (_koha_marc_update_bib_ids) - switching a if !cond {A} else {B} to a if cond {B} else {A} (this was not announced, it's OK, but would have been better if announced 3- cataloguing/merge.pl add a +use C4::Koha; => where is this C4::Koha used ? (I can't see, as there are also a lot of reindenting) 4- my tests show a look I think strange, was it intended ? (screenshot attached) Failed QA for 1, waiting for an answer to 3 and 4, (2 is OK)
Created attachment 7311 [details] screenshot the framework list is on the right, is it intended ? looks a little bit strange to me
It is intended - it's there so you can choose what the framework will be when you finish merging. Nicole
(In reply to comment #18) > It is intended - it's there so you can choose what the framework will be when > you finish merging. Nicole, I understand what it's made for. My surprise is his position on the screen.
Created attachment 7321 [details] [review] Follow-up fix This patch attempts to make the title selection form a little clearer. Also: - Adding subtitle to the display of titles to be merged - Adding a link to preview the MARC record of titles to be merged - Correcting breadcrumbs
Owen, Is your patch a follow up? or an edited patch? Should I apply both? Cause when I tried to apply both I got this: nengard@kohavm:~/kohaclone$ git bz apply 6210 Bug 6210 - Choose framework on Merge [SIGNED-OFF] bug_6210: Select framework if merging two records with different frameworks Apply? [yn] y Applying: bug_6210: Select framework if merging two records with different frameworks /home/nengard/kohaclone/.git/rebase-apply/patch:195: trailing whitespace. $framework = $frameworkcode1; /home/nengard/kohaclone/.git/rebase-apply/patch:221: trailing whitespace. choosereference => 1, /home/nengard/kohaclone/.git/rebase-apply/patch:299: trailing whitespace. [% frameworkcodeloo.frameworktext %] warning: 3 lines add whitespace errors. Follow-up fix Apply? [yn] y Applying: Bug 6210 - Follow up, Choose framework on merge error: patch failed: koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt:198 error: koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt: patch does not apply Patch failed at 0001 Bug 6210 - Follow up, Choose framework on merge When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". Patch left in /tmp/Follow-up-fix-z8BjoC.patch nengard@kohavm:~/kohaclone$
My patch is a follow-up. I just tried using git bz to apply both patches on a fresh branch and had no problems. I wonder if it's because I have this git configuration tweak? http://blog.bigballofwax.co.nz/2011/12/15/fixing-whitespace-when-apply-patches-with-git/
Created attachment 7327 [details] [review] [SIGNED-OFF] Bug 6210 - Follow up, Choose framework on merge - Adding subtitle to the display of titles to be merged - Adding a link to preview the MARC record of titles to be merged - Fixing up markup of form to improve appearance - Correcting breadcrumbs Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
That was it - the follow up was signed off on.
Issues from comment 16: 1. warn is not unconditional, sub returns before warn if all is ok 3. C4::Koha::getframeworks() is used 4. Other layouts are posiible. Fields can be moved around easily without affecting functionality.
thx owen for the new display, thanks srdjan for your answers, passed QA
(In reply to comment #26) > thx owen for the new display, thanks srdjan for your answers, passed QA Probably, these new warnings (like below) come from this first patch, making changes in GetMarcFromKohaField: [Thu Feb 02 14:46:00 2012] [error] [client 192.87.126.61] [Thu Feb 2 14:46:00 2012] opac-search.pl: No marc tags for framework "" field items.biblionumber at /usr/share/koha/testclone/C4/Biblio.pm line 1051., referer: http://libdevelop.rijksmuseum.nl:8008/cgi-bin/koha/opac-search.pl?q=vermeer Note that it repeats for multiple fields!! Just a side note: When writing/testing your patches, please check your error log too.
In Comment #16 I wrote: > QA comments: > 1- there is an unconditionnal warn: warn qq{No marc tags for framework > "$frameworkcode" field $kohafield}; Srdjan answered in comment #25: > Issues from comment 16: > 1. warn is not unconditional, sub returns before warn if all is ok Why didn't I checked, I don't know. But the result is the verbose logs ! In UNIMARC, there are many fields that are in items table and not connected to a MARC field. And that should not trouble anyone. So we should not issue any warning. I've pushed a follow-up removing the warning, the logs are silenced now
Confirming that follow up fixed noise in the log. Thx!
There have been no further reports of problems so I am marking this bug resolved.