Created attachment 25743 [details] [review] Add a diff view for staged MARC records. This patch adds a diff view for records which were updated during a staged MARC import. Test case : * Go to "Tools -> Stage MARC records for import" and upload a MARC file which updates an existing record. Make sure to set a record matching rule and to set the "Action if matching record found" to "Replace existing record with incoming record" * Go to "Tools -> Manage staged MARC records" and click on the file which was previously staged. * In the list of imported records, there should be a "Diff" column. Click on the "View" link in this column. * A window should appear, showing the original and the imported records side by side. Sponsored-by: CCSR ( http://www.ccsr.qc.ca )
Created attachment 30590 [details] [review] Bug 11876 - Add a diff view for staged MARC records. New patch should apply correctly. modified: C4/ImportBatch.pm modified: koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt
Created attachment 30591 [details] [review] Bug 11876 - Ommited files in last patch I forgot to include these files in the last patch new file: catalogue/showdiffmarc.pl new file: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/showdiffmarc.tt
I have tested an import which contains records which match existing records but I don't see a "diff" column in the table of staged records.
Created attachment 30787 [details] [review] Bug 11876 - Diff column is now displayed. If a match is found, a 'View' link appears in the Diff column. Old patch was not implementing datatables, and therefore was not compatible with this version of Koha. modified: koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt modified: tools/batch_records_ajax.pl
Created attachment 30797 [details] [review] [SIGNED-OFF] Bug 11876 - Add a diff view for staged MARC records. New patch should apply correctly. modified: C4/ImportBatch.pm modified: koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 30798 [details] [review] [SIGNED-OFF] Bug 11876 - Ommited files in last patch I forgot to include these files in the last patch new file: catalogue/showdiffmarc.pl new file: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/showdiffmarc.tt Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 30799 [details] [review] [SIGNED-OFF] Bug 11876 - Diff column is now displayed. If a match is found, a 'View' link appears in the Diff column. Old patch was not implementing datatables, and therefore was not compatible with this version of Koha. modified: koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt modified: tools/batch_records_ajax.pl Signed-off-by: Owen Leonard <oleonard@myacpl.org> These patches have some issues but I'm going to submit a follow-up which I think will address them all and offer some improvements as well.
Created attachment 30800 [details] [review] Bug 11876 [Follow-up] Add a diff view to staged MARC Records This follow up makes some corrections to the previously added files and adds some functionality to the diff: A Javascript diff plugin highlights the differences between the records in the two columns. Corrections made: Converted tab indentation to spaces, corrected GPL statement. File organization: Moved showdiffmarc.pl and .tt to /tools/ to match the location of the page with which it functions, tools/manage-marc-import.pl. Corrected permissions on showdiffmarc.pl accordingly. Updates to the template: Added standard includes inclucing header menu and breadcrumbs; converted custom layout to YUI Grid standard. To test, follow the test plan previously defined: - Stage a MARC record batch which contains at least one record match for something already in your catalog. - Locate the staged MARC record batch in Tools -> Manage staged records and click to view the contents. - Find the record which matched an existing record and click the "View" link in the Diff column. - The compare screen should include the header menu and breadcrumbs. The differences between your staged file and the existing record should be higlighted. - You should be able to return to the MARC batch you were previously viewing by following the link in the breadcrumbs or the link at the bottom of the page. - Confirm that the "About" page includes information about the new JavaScript plugin on the Licenses tab.
Bug 11876 - Add a diff view to staged MARC Records. 30797 - [SIGNED-OFF] Bug 11876 - Add a diff view for staged MARC records. 30798 - [SIGNED-OFF] Bug 11876 - Ommited files in last patch 30799 - [SIGNED-OFF] Bug 11876 - Diff column is now displayed. 30800 - Bug 11876 [Follow-up] Add a diff view to staged MARC Records Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 11876 - Add a diff view for staged MARC records. Applying: Bug 11876 - Ommited files in last patch Applying: Bug 11876 - Diff column is now displayed. Applying: Bug 11876 [Follow-up] Add a diff view to staged MARC Records Using index info to reconstruct a base tree... <stdin>:289: new blank line at EOF. + warning: 1 line adds whitespace errors. Falling back to patching base and 3-way merge... Removing koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/showdiffmarc.tt Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/about.tt CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/about.tt Removing catalogue/showdiffmarc.pl Failed to merge in the changes. Patch failed at 0001 Bug 11876 [Follow-up] Add a diff view to staged MARC Records When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-11876-Follow-up-Add-a-diff-view-to-staged-MARC-iDw65M.patch
Created attachment 31835 [details] [review] Bug 11876 [Follow-up] Add a diff view to staged MARC Records This follow up makes some corrections to the previously added files and adds some functionality to the diff: A Javascript diff plugin highlights the differences between the records in the two columns. Corrections made: Converted tab indentation to spaces, corrected GPL statement. File organization: Moved showdiffmarc.pl and .tt to /tools/ to match the location of the page with which it functions, tools/manage-marc-import.pl. Corrected permissions on showdiffmarc.pl accordingly. Updates to the template: Added standard includes inclucing header menu and breadcrumbs; converted custom layout to YUI Grid standard. To test, follow the test plan previously defined: - Stage a MARC record batch which contains at least one record match for something already in your catalog. - Locate the staged MARC record batch in Tools -> Manage staged records and click to view the contents. - Find the record which matched an existing record and click the "View" link in the Diff column. - The compare screen should include the header menu and breadcrumbs. The differences between your staged file and the existing record should be higlighted. - You should be able to return to the MARC batch you were previously viewing by following the link in the breadcrumbs or the link at the bottom of the page. - Confirm that the "About" page includes information about the new JavaScript plugin on the Licenses tab.
Created attachment 31847 [details] [review] [SIGNED OFF] Bug 11876 [Follow-up] Add a diff view to staged MARC Records This follow up makes some corrections to the previously added files and adds some functionality to the diff: A Javascript diff plugin highlights the differences between the records in the two columns. Corrections made: Converted tab indentation to spaces, corrected GPL statement. File organization: Moved showdiffmarc.pl and .tt to /tools/ to match the location of the page with which it functions, tools/manage-marc-import.pl. Corrected permissions on showdiffmarc.pl accordingly. Updates to the template: Added standard includes inclucing header menu and breadcrumbs; converted custom layout to YUI Grid standard. To test, follow the test plan previously defined: - Stage a MARC record batch which contains at least one record match for something already in your catalog. - Locate the staged MARC record batch in Tools -> Manage staged records and click to view the contents. - Find the record which matched an existing record and click the "View" link in the Diff column. - The compare screen should include the header menu and breadcrumbs. The differences between your staged file and the existing record should be higlighted. - You should be able to return to the MARC batch you were previously viewing by following the link in the breadcrumbs or the link at the bottom of the page. - Confirm that the "About" page includes information about the new JavaScript plugin on the Licenses tab. Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
Created attachment 31871 [details] [review] Bug 11876 - Add a diff view for staged MARC records. New patch should apply correctly. modified: C4/ImportBatch.pm modified: koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt Signed-off-by: Owen Leonard <oleonard@myacpl.org> Bug 11876 - Diff column is now displayed. If a match is found, a 'View' link appears in the Diff column. Old patch was not implementing datatables, and therefore was not compatible with this version of Koha. modified: koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt modified: tools/batch_records_ajax.pl Signed-off-by: Owen Leonard <oleonard@myacpl.org> These patches have some issues but I'm going to submit a follow-up which I think will address them all and offer some improvements as well. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 31872 [details] [review] Bug 11876 - Ommited files in last patch I forgot to include these files in the last patch new file: tools/showdiffmarc.pl new file: koha-tmpl/intranet-tmpl/prog/en/modules/tools/showdiffmarc.tt Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 31873 [details] [review] Bug 11876 [Follow-up] Add a diff view to staged MARC Records This follow up makes some corrections to the previously added files and adds some functionality to the diff: A Javascript diff plugin highlights the differences between the records in the two columns. Corrections made: Converted tab indentation to spaces, corrected GPL statement. File organization: Moved showdiffmarc.pl and .tt to /tools/ to match the location of the page with which it functions, tools/manage-marc-import.pl. Corrected permissions on showdiffmarc.pl accordingly. Updates to the template: Added standard includes inclucing header menu and breadcrumbs; converted custom layout to YUI Grid standard. To test, follow the test plan previously defined: - Stage a MARC record batch which contains at least one record match for something already in your catalog. - Locate the staged MARC record batch in Tools -> Manage staged records and click to view the contents. - Find the record which matched an existing record and click the "View" link in the Diff column. - The compare screen should include the header menu and breadcrumbs. The differences between your staged file and the existing record should be higlighted. - You should be able to return to the MARC batch you were previously viewing by following the link in the breadcrumbs or the link at the bottom of the page. - Confirm that the "About" page includes information about the new JavaScript plugin on the Licenses tab. Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Created attachment 31874 [details] [review] Bug 11876: (qa-followup) some minor changes - GetImportBiblios: prepare the query is useless here - use Modern::Perl - Remove useless indentation level in pl file and redirect to 404 if required params are not given. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
I tried to add readability to this patch set: 2 files were renamed and some code was added and removed later. I squashed 2 patches and renamed the files at their creation. I hope it's ok for everyone. Maxime, I don't understand why you get the title of the first imported record. What's happen if several records are imported? If you think the logic is good, you have to provide unit tests for this new routine. Which will be quite easy todo, it only retrieve columns in DB. It's the only concern I have on this enhancement.
I set the status to "Failed QA" (see my last note).
I would be nice to see this make it into 3.18.
The feature freeze is set to Friday this week - Frederick, could take a look at comment 16 and provide a unit test?
Created attachment 32987 [details] [review] unit test added
Created attachment 32995 [details] [review] [SIGNED-OFF] Bug 11876 [Unit test] Add a diff view to staged MARC Records Unit test added http://bugs.koha-community.org/show_bug.cgi?id=11876 Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 33052 [details] [review] [PASSED QA] Bug 11876 - Add a diff view for staged MARC records. New patch should apply correctly. modified: C4/ImportBatch.pm modified: koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt Signed-off-by: Owen Leonard <oleonard@myacpl.org> Bug 11876 - Diff column is now displayed. If a match is found, a 'View' link appears in the Diff column. Old patch was not implementing datatables, and therefore was not compatible with this version of Koha. modified: koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt modified: tools/batch_records_ajax.pl Signed-off-by: Owen Leonard <oleonard@myacpl.org> These patches have some issues but I'm going to submit a follow-up which I think will address them all and offer some improvements as well. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 33053 [details] [review] [PASSED QA] Bug 11876 - Ommited files in last patch I forgot to include these files in the last patch new file: tools/showdiffmarc.pl new file: koha-tmpl/intranet-tmpl/prog/en/modules/tools/showdiffmarc.tt Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 33054 [details] [review] [PASSED QA] Bug 11876 [Follow-up] Add a diff view to staged MARC Records This follow up makes some corrections to the previously added files and adds some functionality to the diff: A Javascript diff plugin highlights the differences between the records in the two columns. Corrections made: Converted tab indentation to spaces, corrected GPL statement. File organization: Moved showdiffmarc.pl and .tt to /tools/ to match the location of the page with which it functions, tools/manage-marc-import.pl. Corrected permissions on showdiffmarc.pl accordingly. Updates to the template: Added standard includes inclucing header menu and breadcrumbs; converted custom layout to YUI Grid standard. To test, follow the test plan previously defined: - Stage a MARC record batch which contains at least one record match for something already in your catalog. - Locate the staged MARC record batch in Tools -> Manage staged records and click to view the contents. - Find the record which matched an existing record and click the "View" link in the Diff column. - The compare screen should include the header menu and breadcrumbs. The differences between your staged file and the existing record should be higlighted. - You should be able to return to the MARC batch you were previously viewing by following the link in the breadcrumbs or the link at the bottom of the page. - Confirm that the "About" page includes information about the new JavaScript plugin on the Licenses tab. Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 33055 [details] [review] [PASSED QA] Bug 11876: (qa-followup) some minor changes - GetImportBiblios: prepare the query is useless here - use Modern::Perl - Remove useless indentation level in pl file and redirect to 404 if required params are not given. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 33056 [details] [review] [PASSED QA] Bug 11876 [Unit test] Add a diff view to staged MARC Records Unit test added http://bugs.koha-community.org/show_bug.cgi?id=11876 Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Patches pushed to master. Nice feature! Thanks Fréférik and Maxime!