Work to be done: On the stage-marc-import.pl screen, the wording would change from: [X] records with at least one match in catalog per matching rule "Y" To [X] records with one match in catalog per matching rule "Y" [X] records with two or more matches in catalog per matching rule "Y" On the manage-marc-import.pl?import_batch_id=#### screen, each record number that is a match would be displayed (multiple matches). The user would then be able to click to see all matches (modal/popup) and select (checkbox) which record(s) they would like to overlay. User would have the option of selecting none, one, or multiple records. - if there are items on the imported record and items are being imported then only one record could be selected - selecting multiple records would overlay the record onto each selected record - no records existing in the catalog would be merged by this tool - the default selection would be the first record found
Created attachment 114813 [details] [review] Bug 26326: Add Koha Objects for Import Records and Import Record Matches To test: 1 - Apply patches 2 - Update database 3 - Generate schema files (dbic) 4 - prove -v t/db_dependent/Koha/Import/Records.t 5 - prove -v t/db_dependent/Koha/Import/Record/Matches.t
Created attachment 114814 [details] [review] Bug 22785: Allow option to choose which record match is applied during import This patchset adds the display of all matches found during import to the import management screen A staff member with the permission to manage batches will be able to select for any individual record which match, or none, should be used during import To test: 1 - Import a batch of records or export existing records from your catalog 2 - Import the file (again) and select a matching rule that will find matches 3 - Note that you now have radio buttons allowing you to select a record, or none 4 - Test scenarios: I - When 'Action if matching record found' is 'Ignore' a - Imported record ignored if match is selected b - 'Action if no match found' followed if no match is selected (Ignore matches) II - When 'Action if matching record found' is 'Replace' a - The chosen record is the one overlayed (you can edit the chosen record before importing to confirm) b - 'Action if no match found' followed if no match is selected (Ignore matches) III - When 'Action if matching record found' is 'Add incoming record' a - Record is added regardless of matches 5 - Confirm 'Diff' 'View' links work as expected 6 - Confirm that after records are imported the radio buttons to choose are disabled
Created attachment 114815 [details] [review] Bug 22785: DO NOT PUSH Schema updates
Created attachment 114816 [details] [review] Bug 22785: Update Schema for boolean
In the test plan,is it necessary to set matching rules in administration page ? Without one, the only choice in "Record matching rule" line is "Don't look for matching records"
I've set concordance rule in my sandbox and play 2nd step of the test plan : it's OK. At the step 3, I don't understand where radio buttons should to be ? I can't see no radio buttons, before or after importing the new file. Is the patch really applied on this sandbox http://sandboxes.ptfs-europe.co.uk/provision_log/bz22785 ?
(In reply to Pascale Nalon from comment #6) > I've set concordance rule in my sandbox and play 2nd step of the test plan : > it's OK. > At the step 3, I don't understand where radio buttons should to be ? I can't > see no radio buttons, before or after importing the new file. > > Is the patch really applied on this sandbox > http://sandboxes.ptfs-europe.co.uk/provision_log/bz22785 ? Checking the git log it only appears the dependency was applied - you can click 'Apply patches' under 'Actions' to apply the patches from this bug
Created attachment 120995 [details] [review] Bug 22785: Allow option to choose which record match is applied during import This patchset adds the display of all matches found during import to the import management screen A staff member with the permission to manage batches will be able to select for any individual record which match, or none, should be used during import To test: 1 - Import a batch of records or export existing records from your catalog 2 - Import the file (again) and select a matching rule that will find matches 3 - Note that you now have radio buttons allowing you to select a record, or none 4 - Test scenarios: I - When 'Action if matching record found' is 'Ignore' a - Imported record ignored if match is selected b - 'Action if no match found' followed if no match is selected (Ignore matches) II - When 'Action if matching record found' is 'Replace' a - The chosen record is the one overlayed (you can edit the chosen record before importing to confirm) b - 'Action if no match found' followed if no match is selected (Ignore matches) III - When 'Action if matching record found' is 'Add incoming record' a - Record is added regardless of matches 5 - Confirm 'Diff' 'View' links work as expected 6 - Confirm that after records are imported the radio buttons to choose are disabled
Created attachment 120996 [details] [review] Bug 22785: DO NOT PUSH Schema updates
Created attachment 120997 [details] [review] Bug 22785: Update Schema for boolean
I took bib#1, and reimported it without editing, creating bib#439. I then edited ONLY the 245a in my downloaded copy of the bib and reimported it again, matching on ISBN. The incoming record shows matches with #1 and #439, as expected. The smaller issue is that the list of potential matches isn't consistently in the same order. Sometimes 1 was above 439 and sometimes it was the other way around. This is really confusing, as it changed on the page load at import - I picked the bottom match, selected import, and when it finished the two matches had reversed their order. Much more importantly, though, it consistently overlaid on bib#1, even when I told it I wanted to match to bib#439 instead. To recreate: - have two identical bibs in your system - import a third bib that you know will match the identical bibs but has a different title - stage and match, telling Koha to overlay on a match - select the higher bib number from your two potential matches - import - see the title changed on the lower bib number
Created attachment 121149 [details] [review] Bug 22785: (follow-up) Don't sort by chosen and fix selection of matches Previously the sorting took 'chosen' into account and would move a selected match to the top on next load - it is better to preserve the same sorting every time When loading matches the 'cehcked' variable was not being cleared, so multiple matches were being marked 'checked="checked"'. Fixing this ensures the correct record displays as chosen
Created attachment 121167 [details] [review] Bug 22785: Allow option to choose which record match is applied during import This patchset adds the display of all matches found during import to the import management screen A staff member with the permission to manage batches will be able to select for any individual record which match, or none, should be used during import To test: 1 - Import a batch of records or export existing records from your catalog 2 - Import the file (again) and select a matching rule that will find matches 3 - Note that you now have radio buttons allowing you to select a record, or none 4 - Test scenarios: I - When 'Action if matching record found' is 'Ignore' a - Imported record ignored if match is selected b - 'Action if no match found' followed if no match is selected (Ignore matches) II - When 'Action if matching record found' is 'Replace' a - The chosen record is the one overlayed (you can edit the chosen record before importing to confirm) b - 'Action if no match found' followed if no match is selected (Ignore matches) III - When 'Action if matching record found' is 'Add incoming record' a - Record is added regardless of matches 5 - Confirm 'Diff' 'View' links work as expected 6 - Confirm that after records are imported the radio buttons to choose are disabled
Created attachment 121168 [details] [review] Bug 22785: DO NOT PUSH Schema updates
Created attachment 121169 [details] [review] Bug 22785: Update Schema for boolean
Created attachment 121170 [details] [review] Bug 22785: (follow-up) Don't sort by chosen and fix selection of matches Previously the sorting took 'chosen' into account and would move a selected match to the top on next load - it is better to preserve the same sorting every time When loading matches the 'cehcked' variable was not being cleared, so multiple matches were being marked 'checked="checked"'. Fixing this ensures the correct record displays as chosen
Created attachment 121171 [details] [review] Bug 22785: Allow option to choose which record match is applied during import This patchset adds the display of all matches found during import to the import management screen A staff member with the permission to manage batches will be able to select for any individual record which match, or none, should be used during import To test: 1 - Import a batch of records or export existing records from your catalog 2 - Import the file (again) and select a matching rule that will find matches 3 - Note that you now have radio buttons allowing you to select a record, or none 4 - Test scenarios: I - When 'Action if matching record found' is 'Ignore' a - Imported record ignored if match is selected b - 'Action if no match found' followed if no match is selected (Ignore matches) II - When 'Action if matching record found' is 'Replace' a - The chosen record is the one overlayed (you can edit the chosen record before importing to confirm) b - 'Action if no match found' followed if no match is selected (Ignore matches) III - When 'Action if matching record found' is 'Add incoming record' a - Record is added regardless of matches 5 - Confirm 'Diff' 'View' links work as expected 6 - Confirm that after records are imported the radio buttons to choose are disabled
Created attachment 121172 [details] [review] Bug 22785: DO NOT PUSH Schema updates
Created attachment 121173 [details] [review] Bug 22785: Update Schema for boolean
Created attachment 121174 [details] [review] Bug 22785: (follow-up) Don't sort by chosen and fix selection of matches Previously the sorting took 'chosen' into account and would move a selected match to the top on next load - it is better to preserve the same sorting every time When loading matches the 'cehcked' variable was not being cleared, so multiple matches were being marked 'checked="checked"'. Fixing this ensures the correct record displays as chosen
Created attachment 121204 [details] [review] Bug 22785: Allow option to choose which record match is applied during import This patchset adds the display of all matches found during import to the import management screen A staff member with the permission to manage batches will be able to select for any individual record which match, or none, should be used during import To test: 1 - Import a batch of records or export existing records from your catalog 2 - Import the file (again) and select a matching rule that will find matches 3 - Note that you now have radio buttons allowing you to select a record, or none 4 - Test scenarios: I - When 'Action if matching record found' is 'Ignore' a - Imported record ignored if match is selected b - 'Action if no match found' followed if no match is selected (Ignore matches) II - When 'Action if matching record found' is 'Replace' a - The chosen record is the one overlayed (you can edit the chosen record before importing to confirm) b - 'Action if no match found' followed if no match is selected (Ignore matches) III - When 'Action if matching record found' is 'Add incoming record' a - Record is added regardless of matches 5 - Confirm 'Diff' 'View' links work as expected 6 - Confirm that after records are imported the radio buttons to choose are disabled Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Created attachment 121205 [details] [review] Bug 22785: DO NOT PUSH Schema updates Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Created attachment 121206 [details] [review] Bug 22785: Update Schema for boolean Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Created attachment 121207 [details] [review] Bug 22785: (follow-up) Don't sort by chosen and fix selection of matches Previously the sorting took 'chosen' into account and would move a selected match to the top on next load - it is better to preserve the same sorting every time When loading matches the 'cehcked' variable was not being cleared, so multiple matches were being marked 'checked="checked"'. Fixing this ensures the correct record displays as chosen Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Base does not apply
Created attachment 126369 [details] [review] Bug 22785: Allow option to choose which record match is applied during import This patchset adds the display of all matches found during import to the import management screen A staff member with the permission to manage batches will be able to select for any individual record which match, or none, should be used during import To test: 1 - Import a batch of records or export existing records from your catalog 2 - Import the file (again) and select a matching rule that will find matches 3 - Note that you now have radio buttons allowing you to select a record, or none 4 - Test scenarios: I - When 'Action if matching record found' is 'Ignore' a - Imported record ignored if match is selected b - 'Action if no match found' followed if no match is selected (Ignore matches) II - When 'Action if matching record found' is 'Replace' a - The chosen record is the one overlayed (you can edit the chosen record before importing to confirm) b - 'Action if no match found' followed if no match is selected (Ignore matches) III - When 'Action if matching record found' is 'Add incoming record' a - Record is added regardless of matches 5 - Confirm 'Diff' 'View' links work as expected 6 - Confirm that after records are imported the radio buttons to choose are disabled Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Created attachment 126370 [details] [review] Bug 22785: DO NOT PUSH Schema updates Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Created attachment 126371 [details] [review] Bug 22785: Update Schema for boolean Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Created attachment 126372 [details] [review] Bug 22785: (follow-up) Don't sort by chosen and fix selection of matches Previously the sorting took 'chosen' into account and would move a selected match to the top on next load - it is better to preserve the same sorting every time When loading matches the 'cehcked' variable was not being cleared, so multiple matches were being marked 'checked="checked"'. Fixing this ensures the correct record displays as chosen Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Created attachment 126522 [details] [review] Bug 22785: Allow option to choose which record match is applied during import This patchset adds the display of all matches found during import to the import management screen A staff member with the permission to manage batches will be able to select for any individual record which match, or none, should be used during import To test: 1 - Import a batch of records or export existing records from your catalog 2 - Import the file (again) and select a matching rule that will find matches 3 - Note that you now have radio buttons allowing you to select a record, or none 4 - Test scenarios: I - When 'Action if matching record found' is 'Ignore' a - Imported record ignored if match is selected b - 'Action if no match found' followed if no match is selected (Ignore matches) II - When 'Action if matching record found' is 'Replace' a - The chosen record is the one overlayed (you can edit the chosen record before importing to confirm) b - 'Action if no match found' followed if no match is selected (Ignore matches) III - When 'Action if matching record found' is 'Add incoming record' a - Record is added regardless of matches 5 - Confirm 'Diff' 'View' links work as expected 6 - Confirm that after records are imported the radio buttons to choose are disabled Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Created attachment 126523 [details] [review] Bug 22785: DO NOT PUSH Schema updates Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Created attachment 126524 [details] [review] Bug 22785: Update Schema for boolean Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Created attachment 126525 [details] [review] Bug 22785: (follow-up) Don't sort by chosen and fix selection of matches Previously the sorting took 'chosen' into account and would move a selected match to the top on next load - it is better to preserve the same sorting every time When loading matches the 'cehcked' variable was not being cleared, so multiple matches were being marked 'checked="checked"'. Fixing this ensures the correct record displays as chosen Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
When I attempt to change my choice by selecting "Ignore Match", for example, Koha produces the popup error message "Unable to update match choices".
(In reply to Benjamin Daeuber from comment #34) > When I attempt to change my choice by selecting "Ignore Match", for example, > Koha produces the popup error message "Unable to update match choices". Hi Ben, Did you restart memcached/plack after applying the patches? The selection worked for me. You should see PUT/DELETE routes for: /api/v1/import/{import_batch_id}/records/{import_record_id}/matches/chosen if you check http://localhost:8080/api/v1/.hmtl adjusting the URL for your test environment -Nick
(In reply to Nick Clemens from comment #35) > Did you restart memcached/plack after applying the patches? The selection > worked for me. > You should see PUT/DELETE routes for: > /api/v1/import/{import_batch_id}/records/{import_record_id}/matches/chosen > if you check > http://localhost:8080/api/v1/.hmtl > adjusting the URL for your test environment I've tried that and I do not see a PUT route. This is on both my docker test environment and I spun up a sandbox just to ensure it wasn't only me. I restart plack on both. I will try taking down my container and rebuilding.
Created attachment 126531 [details] [review] Bug 22785: API files
/me sheepishly reattaches API files Looks like I didn't commit then when I rebased, apologies
Created attachment 126532 [details] [review] Bug 22785: API files That did it, thanks. Signed-off-by: Benjamin Daeuber <benjamin@valla>
(In reply to Benjamin Daeuber from comment #39) > Created attachment 126532 [details] [review] [review] > Bug 22785: API files > > That did it, thanks. > > Signed-off-by: Benjamin Daeuber <benjamin@valla> Ugg, sorry about that signoff, I forgot to update my local config. Anyway, thank you, it looks good now.
Created attachment 126533 [details] [review] Bug 26326: DO NOT PUSH Schema changes Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com>
Created attachment 126534 [details] [review] Bug 22785: Allow option to choose which record match is applied during import This patchset adds the display of all matches found during import to the import management screen A staff member with the permission to manage batches will be able to select for any individual record which match, or none, should be used during import To test: 1 - Import a batch of records or export existing records from your catalog 2 - Import the file (again) and select a matching rule that will find matches 3 - Note that you now have radio buttons allowing you to select a record, or none 4 - Test scenarios: I - When 'Action if matching record found' is 'Ignore' a - Imported record ignored if match is selected b - 'Action if no match found' followed if no match is selected (Ignore matches) II - When 'Action if matching record found' is 'Replace' a - The chosen record is the one overlayed (you can edit the chosen record before importing to confirm) b - 'Action if no match found' followed if no match is selected (Ignore matches) III - When 'Action if matching record found' is 'Add incoming record' a - Record is added regardless of matches 5 - Confirm 'Diff' 'View' links work as expected 6 - Confirm that after records are imported the radio buttons to choose are disabled Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com>
Created attachment 126535 [details] [review] Bug 22785: DO NOT PUSH Schema updates Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Created attachment 126536 [details] [review] Bug 22785: Update Schema for boolean Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Created attachment 126537 [details] [review] Bug 22785: (follow-up) Don't sort by chosen and fix selection of matches Previously the sorting took 'chosen' into account and would move a selected match to the top on next load - it is better to preserve the same sorting every time When loading matches the 'cehcked' variable was not being cleared, so multiple matches were being marked 'checked="checked"'. Fixing this ensures the correct record displays as chosen Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Created attachment 126538 [details] [review] Bug 22785: API files Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com>
I've PQA on the base patch for adding the new classes, but I'll probably need some help here especially for the API parts of the patch. 1) Translatability You did great with View a few lines above, but here "Ignore matches" is not translatable: + $('td:eq(4) ul', nRow).prepend('<li><label><input type="radio" data-import_record_id="'+aData['import_record_id']+'" class="chosen" name="import_record_id_'+aData['import_record_id']+'_match" value="none" ' + checked + disabled + ' > Ignore matches</label></li>'); Also here: + }).fail(function(){ alert("Unable to update match choices"); return false; }); 2) Unrelated file change reports/acquisitions_stats.pl + warn $strcalc; I am marking this as a candidate for early inclusion in 22.05 as this enh is a bit bigger and we have already reached soft feature freeze. I am a little worried about side effects, like with the CLI tools for staged MARC import, so would like to see those tested as well.
Created attachment 128820 [details] [review] Bug 22785: Allow option to choose which record match is applied during import This patchset adds the display of all matches found during import to the import management screen A staff member with the permission to manage batches will be able to select for any individual record which match, or none, should be used during import To test: 1 - Import a batch of records or export existing records from your catalog 2 - Import the file (again) and select a matching rule that will find matches 3 - Note that you now have radio buttons allowing you to select a record, or none 4 - Test scenarios: I - When 'Action if matching record found' is 'Ignore' a - Imported record ignored if match is selected b - 'Action if no match found' followed if no match is selected (Ignore matches) II - When 'Action if matching record found' is 'Replace' a - The chosen record is the one overlayed (you can edit the chosen record before importing to confirm) b - 'Action if no match found' followed if no match is selected (Ignore matches) III - When 'Action if matching record found' is 'Add incoming record' a - Record is added regardless of matches 5 - Confirm 'Diff' 'View' links work as expected 6 - Confirm that after records are imported the radio buttons to choose are disabled Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Bug 22785: API files Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com>
Created attachment 128821 [details] [review] Bug 22785: DO NOT PUSH Schema Updates
Created attachment 128822 [details] [review] Bug 22785: Update Schema for boolean Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com>
Created attachment 128823 [details] [review] Bug 22785: (follow-up) Don't sort by chosen and fix selection of matches Previously the sorting took 'chosen' into account and would move a selected match to the top on next load - it is better to preserve the same sorting every time When loading matches the 'cehcked' variable was not being cleared, so multiple matches were being marked 'checked="checked"'. Fixing this ensures the correct record displays as chosen Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com>
Created attachment 128824 [details] [review] Bug 22785: (follow-up) Fix translatability
(In reply to Katrin Fischer from comment #47) > 1) Translatability Updated > > 2) Unrelated file change Removed > I am a little worried about side effects, like with the CLI tools for staged > MARC import, so would like to see those tested as well. There should be no change - previously we just picked the first mathc, now we explicitly mark it as chosen during staging and will then select it during import.
Created attachment 130726 [details] [review] Bug 22785: Allow option to choose which record match is applied during import This patchset adds the display of all matches found during import to the import management screen A staff member with the permission to manage batches will be able to select for any individual record which match, or none, should be used during import To test: 1 - Import a batch of records or export existing records from your catalog 2 - Import the file (again) and select a matching rule that will find matches 3 - Note that you now have radio buttons allowing you to select a record, or none 4 - Test scenarios: I - When 'Action if matching record found' is 'Ignore' a - Imported record ignored if match is selected b - 'Action if no match found' followed if no match is selected (Ignore matches) II - When 'Action if matching record found' is 'Replace' a - The chosen record is the one overlayed (you can edit the chosen record before importing to confirm) b - 'Action if no match found' followed if no match is selected (Ignore matches) III - When 'Action if matching record found' is 'Add incoming record' a - Record is added regardless of matches 5 - Confirm 'Diff' 'View' links work as expected 6 - Confirm that after records are imported the radio buttons to choose are disabled Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Bug 22785: API files Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com>
Created attachment 130727 [details] [review] Bug 22785: DO NOT PUSH Schema Updates
Created attachment 130728 [details] [review] Bug 22785: Update Schema for boolean Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com>
Created attachment 130729 [details] [review] Bug 22785: (follow-up) Don't sort by chosen and fix selection of matches Previously the sorting took 'chosen' into account and would move a selected match to the top on next load - it is better to preserve the same sorting every time When loading matches the 'cehcked' variable was not being cleared, so multiple matches were being marked 'checked="checked"'. Fixing this ensures the correct record displays as chosen Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com>
Created attachment 130730 [details] [review] Bug 22785: (follow-up) Fix translatability
OK C4/ImportBatch.pm FAIL installer/data/mysql/atomicupdate/bug_22785.pl FAIL file permissions File must have the exec flag FAIL t/db_dependent/api/v1/import_record_matches.t FAIL file permissions File must have the exec flag
Besides the QA test failures which might be false positives (files don't appear to exist?) what is really blocking me here is: I see no checkboxes! I have staged the same file of records twice. Imported one file into catalog. Matched the other on ISBN. -> No checkboxed in result list, although there are several Match found in the list. Am I looking in the wrong spot? http://localhost:8081/cgi-bin/koha/tools/manage-marc-import.pl?import_batch_id=5 and have several
Did the database update get lost somehow? We have a Schema change noting a new column, kohastructure.sql, but no atomic update file.
(In reply to Katrin Fischer from comment #61) > Did the database update get lost somehow? We have a Schema change noting a > new column, kohastructure.sql, but no atomic update file. Did a git reset --hard origin/master and reapplied the patches. The missing files have reappeared. I have no clue how they got deleted the first time. ls installer/data/mysql/atomicupdate/ didn't list the file, now it does... maybe hallucinating.
I am adding a second sign-off, but as I had a bit of a rough start with this one, I'd like someone else to have a final look. It turns out, I was not hallucinating, but there is something odd happening here with the QA test tools on ktd in that it deleted and modified files: reset --hard origin/master git bz apply 22785 git status - clean kshell qa -v 2 testing 5 commit(s) (applied to 4cc3c0a '60 Bug 30133: (follow-up) Update obje') Processing files before patches |========================>| 17 / 17 (100.00%) Processing files after patches |========================>| 17 / 17 (100.00%) OK C4/ImportBatch.pm OK Koha/REST/V1/ImportRecordMatches.pm OK Koha/Schema/Result/ImportRecordMatch.pm OK api/v1/swagger/definitions.yaml OK api/v1/swagger/definitions/import_record_match.yaml OK api/v1/swagger/parameters.yaml OK api/v1/swagger/parameters/import_record_match.yaml OK api/v1/swagger/paths.yaml OK api/v1/swagger/paths/import_record_matches.yaml OK api/v1/swagger/x-primitives.yaml FAIL installer/data/mysql/atomicupdate/bug_22785.pl FAIL file permissions File must have the exec flag OK installer/data/mysql/kohastructure.sql OK koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt OK t/db_dependent/ImportBatch.t OK t/db_dependent/Koha/Import/Record/Matches.t FAIL t/db_dependent/api/v1/import_record_matches.t FAIL file permissions File must have the exec flag OK tools/batch_records_ajax.pl git status On branch 59-22785-manage-staged Changes to be committed: (use "git restore --staged <file>..." to unstage) modified: C4/ImportBatch.pm deleted: Koha/REST/V1/ImportRecordMatches.pm modified: Koha/Schema/Result/ImportRecordMatch.pm modified: api/v1/swagger/definitions.yaml deleted: api/v1/swagger/definitions/import_record_match.json deleted: api/v1/swagger/definitions/import_record_match.yaml modified: api/v1/swagger/parameters.yaml deleted: api/v1/swagger/parameters/import_record_match.json deleted: api/v1/swagger/parameters/import_record_match.yaml modified: api/v1/swagger/paths.yaml deleted: api/v1/swagger/paths/import_record_matches.json deleted: api/v1/swagger/paths/import_record_matches.yaml modified: api/v1/swagger/x-primitives.yaml deleted: installer/data/mysql/atomicupdate/bug_22785.pl modified: installer/data/mysql/kohastructure.sql modified: koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt modified: t/db_dependent/ImportBatch.t modified: t/db_dependent/Koha/Import/Record/Matches.t deleted: t/db_dependent/api/v1/import_record_matches.t modified: tools/batch_records_ajax.pl
Created attachment 131143 [details] [review] Bug 22785: Allow option to choose which record match is applied during import This patchset adds the display of all matches found during import to the import management screen A staff member with the permission to manage batches will be able to select for any individual record which match, or none, should be used during import To test: 1 - Import a batch of records or export existing records from your catalog 2 - Import the file (again) and select a matching rule that will find matches 3 - Note that you now have radio buttons allowing you to select a record, or none 4 - Test scenarios: I - When 'Action if matching record found' is 'Ignore' a - Imported record ignored if match is selected b - 'Action if no match found' followed if no match is selected (Ignore matches) II - When 'Action if matching record found' is 'Replace' a - The chosen record is the one overlayed (you can edit the chosen record before importing to confirm) b - 'Action if no match found' followed if no match is selected (Ignore matches) III - When 'Action if matching record found' is 'Add incoming record' a - Record is added regardless of matches 5 - Confirm 'Diff' 'View' links work as expected 6 - Confirm that after records are imported the radio buttons to choose are disabled Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Bug 22785: API files Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 131144 [details] [review] Bug 22785: DO NOT PUSH Schema Updates Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 131145 [details] [review] Bug 22785: Update Schema for boolean Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 131146 [details] [review] Bug 22785: (follow-up) Don't sort by chosen and fix selection of matches Previously the sorting took 'chosen' into account and would move a selected match to the top on next load - it is better to preserve the same sorting every time When loading matches the 'cehcked' variable was not being cleared, so multiple matches were being marked 'checked="checked"'. Fixing this ensures the correct record displays as chosen Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 131147 [details] [review] Bug 22785: (follow-up) Fix translatability Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
I am sorry, but it looks like this will need a bigger rebase: Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 22785: Allow option to choose which record match is applied during import Using index info to reconstruct a base tree... M C4/ImportBatch.pm A api/v1/swagger/definitions.yaml A api/v1/swagger/parameters.yaml A api/v1/swagger/paths.yaml A api/v1/swagger/x-primitives.yaml M installer/data/mysql/kohastructure.sql M koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt Auto-merging installer/data/mysql/kohastructure.sql CONFLICT (modify/delete): api/v1/swagger/x-primitives.yaml deleted in HEAD and modified in Bug 22785: Allow option to choose which record match is applied during import. Version Bug 22785: Allow option to choose which record match is applied during import of api/v1/swagger/x-primitives.yaml left in tree. CONFLICT (modify/delete): api/v1/swagger/paths.yaml deleted in HEAD and modified in Bug 22785: Allow option to choose which record match is applied during import. Version Bug 22785: Allow option to choose which record match is applied during import of api/v1/swagger/paths.yaml left in tree. CONFLICT (modify/delete): api/v1/swagger/parameters.yaml deleted in HEAD and modified in Bug 22785: Allow option to choose which record match is applied during import. Version Bug 22785: Allow option to choose which record match is applied during import of api/v1/swagger/parameters.yaml left in tree. CONFLICT (modify/delete): api/v1/swagger/definitions.yaml deleted in HEAD and modified in Bug 22785: Allow option to choose which record match is applied during import. Version Bug 22785: Allow option to choose which record match is applied during import of api/v1/swagger/definitions.yaml left in tree. Auto-merging C4/ImportBatch.pm error: Failed to merge in the changes. Patch failed at 0001 Bug 22785: Allow option to choose which record match is applied during import hint: Use 'git am --show-current-patch=diff' to see the failed patch 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-22785-Allow-option-to-choose-which-record-matc-Drlq9o.patch
Created attachment 133947 [details] [review] Bug 22785: Allow option to choose which record match is applied during import This patchset adds the display of all matches found during import to the import management screen A staff member with the permission to manage batches will be able to select for any individual record which match, or none, should be used during import To test: 1 - Import a batch of records or export existing records from your catalog 2 - Import the file (again) and select a matching rule that will find matches 3 - Note that you now have radio buttons allowing you to select a record, or none 4 - Test scenarios: I - When 'Action if matching record found' is 'Ignore' a - Imported record ignored if match is selected b - 'Action if no match found' followed if no match is selected (Ignore matches) II - When 'Action if matching record found' is 'Replace' a - The chosen record is the one overlayed (you can edit the chosen record before importing to confirm) b - 'Action if no match found' followed if no match is selected (Ignore matches) III - When 'Action if matching record found' is 'Add incoming record' a - Record is added regardless of matches 5 - Confirm 'Diff' 'View' links work as expected 6 - Confirm that after records are imported the radio buttons to choose are disabled Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Bug 22785: API files Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 133948 [details] [review] Bug 22785: DO NOT PUSH Schema Updates Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 133949 [details] [review] Bug 22785: Update Schema for boolean Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 133950 [details] [review] Bug 22785: (follow-up) Don't sort by chosen and fix selection of matches Previously the sorting took 'chosen' into account and would move a selected match to the top on next load - it is better to preserve the same sorting every time When loading matches the 'cehcked' variable was not being cleared, so multiple matches were being marked 'checked="checked"'. Fixing this ensures the correct record displays as chosen Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 133951 [details] [review] Bug 22785: (follow-up) Fix translatability Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
I still have some strange issues here running the QA script. (see comment #63) Could someone else please take over from here?
Created attachment 134127 [details] [review] Bug 22785: Allow option to choose which record match is applied during import This patchset adds the display of all matches found during import to the import management screen A staff member with the permission to manage batches will be able to select for any individual record which match, or none, should be used during import To test: 1 - Import a batch of records or export existing records from your catalog 2 - Import the file (again) and select a matching rule that will find matches 3 - Note that you now have radio buttons allowing you to select a record, or none 4 - Test scenarios: I - When 'Action if matching record found' is 'Ignore' a - Imported record ignored if match is selected b - 'Action if no match found' followed if no match is selected (Ignore matches) II - When 'Action if matching record found' is 'Replace' a - The chosen record is the one overlayed (you can edit the chosen record before importing to confirm) b - 'Action if no match found' followed if no match is selected (Ignore matches) III - When 'Action if matching record found' is 'Add incoming record' a - Record is added regardless of matches 5 - Confirm 'Diff' 'View' links work as expected 6 - Confirm that after records are imported the radio buttons to choose are disabled Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Bug 22785: API files Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 134128 [details] [review] Bug 22785: DO NOT PUSH Schema Updates Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 134129 [details] [review] Bug 22785: Update Schema for boolean Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 134130 [details] [review] Bug 22785: (follow-up) Don't sort by chosen and fix selection of matches Previously the sorting took 'chosen' into account and would move a selected match to the top on next load - it is better to preserve the same sorting every time When loading matches the 'cehcked' variable was not being cleared, so multiple matches were being marked 'checked="checked"'. Fixing this ensures the correct record displays as chosen Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 134131 [details] [review] Bug 22785: (follow-up) Fix translatability Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 134132 [details] [review] Bug 22785: (QA follow-up) Remove superflous spec files We don't need these any more.. I think they crept back in during rebases
All appears to be working well, QA scripts are happy too.
Scratch that.. I forgot to test an action and now found a bug. If you select to 'Ignore' then change your mind and select a match again.. the API request fails with: [ { "message": "Expected application/json - got application/x-www-form-urlencoded; charset=UTF-8.", "path": "/body" } ]
Created attachment 134219 [details] [review] Bug 22785: (follow-up) Update contentType in request
Created attachment 134368 [details] [review] Bug 22785: Allow option to choose which record match is applied during import This patchset adds the display of all matches found during import to the import management screen A staff member with the permission to manage batches will be able to select for any individual record which match, or none, should be used during import To test: 1 - Import a batch of records or export existing records from your catalog 2 - Import the file (again) and select a matching rule that will find matches 3 - Note that you now have radio buttons allowing you to select a record, or none 4 - Test scenarios: I - When 'Action if matching record found' is 'Ignore' a - Imported record ignored if match is selected b - 'Action if no match found' followed if no match is selected (Ignore matches) II - When 'Action if matching record found' is 'Replace' a - The chosen record is the one overlayed (you can edit the chosen record before importing to confirm) b - 'Action if no match found' followed if no match is selected (Ignore matches) III - When 'Action if matching record found' is 'Add incoming record' a - Record is added regardless of matches 5 - Confirm 'Diff' 'View' links work as expected 6 - Confirm that after records are imported the radio buttons to choose are disabled Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Bug 22785: API files Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 134369 [details] [review] Bug 22785: DO NOT PUSH Schema Updates Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 134370 [details] [review] Bug 22785: Update Schema for boolean Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 134371 [details] [review] Bug 22785: (follow-up) Don't sort by chosen and fix selection of matches Previously the sorting took 'chosen' into account and would move a selected match to the top on next load - it is better to preserve the same sorting every time When loading matches the 'cehcked' variable was not being cleared, so multiple matches were being marked 'checked="checked"'. Fixing this ensures the correct record displays as chosen Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> Signed-off-by: Ben Daeuber <bdaeuber@cityoffargo.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 134372 [details] [review] Bug 22785: (follow-up) Fix translatability Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 134373 [details] [review] Bug 22785: (QA follow-up) Remove superflous spec files We don't need these any more.. I think they crept back in during rebases Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 134374 [details] [review] Bug 22785: (follow-up) Update contentType in request Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
All working now :) PQA
Pushed to master for 22.05, thanks to everybody involved [U+1F984]
Arf this breaks test suite : https://jenkins.koha-community.org/view/master/job/Koha_Master_D10/628/testReport/junit/(root)/xt_api_t/Unnamed_test_case_1571/
Created attachment 134575 [details] [review] Bug 22785: (follow-up) no additionalProperties
Created attachment 134608 [details] [review] Bug 22785: (follow-up) no additionalProperties Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Follow-up tested, passed and pushed as RM Assistant. Thanks for the quick action Nick :)