424 $import_record_id = AddBiblioToBatch($batch_id, $rec_num, $marc_record, $encoding, int(rand(99999)), 0); 430 $import_record_id = AddAuthToBatch($batch_id, $rec_num, $marc_record, $encoding, int(rand(99999)), 0, $marc_type); This populates: my $update_counts = @_ ? shift : 1; Which is used once: _update_batch_record_counts($batch_id) if $update_counts; So...almost always we want to update, but very occasionally, randomly, don't?
Looks like it's coming from commit 5867683fe9aa91d9284d3554cebff9bbec2fa117 Bug 22532: Remove Z39.50 random Those rand calls must be removed.
Created attachment 135047 [details] [review] Bug 26632: (Bug 22532 follow-up) Remove random variables AddBiblioToBatch and AddAuthToBatch were btoh passing a random number for the parameter $update_counts This simply removes that value as should have been done on 22532 To test: 1 - Stage a marc file 2 - Confirm it works befor and after patch
Created attachment 135048 [details] [review] Bug 26632: Remove two more occurrences
Created attachment 138612 [details] [review] Bug 26632: (Bug 22532 follow-up) Remove random variables AddBiblioToBatch and AddAuthToBatch were btoh passing a random number for the parameter $update_counts This simply removes that value as should have been done on 22532 To test: 1 - Stage a marc file 2 - Confirm it works befor and after patch Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Created attachment 138613 [details] [review] Bug 26632: Remove two more occurrences Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Please don't forget to set Assignee!
Created attachment 139242 [details] [review] Bug 26632: (Bug 22532 follow-up) Remove random variables AddBiblioToBatch and AddAuthToBatch were btoh passing a random number for the parameter $update_counts This simply removes that value as should have been done on 22532 To test: 1 - Stage a marc file 2 - Confirm it works befor and after patch Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 139243 [details] [review] Bug 26632: Remove two more occurrences Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 22.11. Nice work everyone, thanks!
Backported to 22.05.x for 22.05.06
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed. Nothing to document it seems, marking resolved.
Thanks! Pushed to 21.11 for 21.11.12