Bug 30974 - Job size not correct for indexing jobs
Summary: Job size not correct for indexing jobs
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Martin Renvoize
URL:
Keywords: rel_22_05_candidate
Depends on: 22417
Blocks:
  Show dependency treegraph
 
Reported: 2022-06-16 08:21 UTC by Jonathan Druart
Modified: 2022-07-13 20:01 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00, 22.05.03


Attachments
Bug 30974: Set size for indexing jobs to 1 (1.29 KB, patch)
2022-06-16 08:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30974: Set size for indexing jobs to 1 (1.35 KB, patch)
2022-06-16 09:54 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2022-06-16 08:21:48 UTC
job's size is the number of records to index, but when finished the progress is always set to 1.
Comment 1 Jonathan Druart 2022-06-16 08:24:43 UTC
Created attachment 136126 [details] [review]
Bug 30974: Set size for indexing jobs to 1

job's size is the number of records to index, but when finished the progress is always set to 1.

Wich leads to: finished 1/42

Test plan:
Don't apply this patch
Use the batch item modification tool to update more than 1 item
Notice that the new indexing job has a size of the number of items you
modified
When finished, the job detail shows "Finished. 1/X"
Apply this patch, repeat
Notice that now the progress shows 0/1 before the job is done, then 1/1
when finished
Comment 2 Martin Renvoize 2022-06-16 09:54:04 UTC
Created attachment 136137 [details] [review]
Bug 30974: Set size for indexing jobs to 1

job's size is the number of records to index, but when finished the progress is always set to 1.

Wich leads to: finished 1/42

Test plan:
Don't apply this patch
Use the batch item modification tool to update more than 1 item
Notice that the new indexing job has a size of the number of items you
modified
When finished, the job detail shows "Finished. 1/X"
Apply this patch, repeat
Notice that now the progress shows 0/1 before the job is done, then 1/1
when finished

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize 2022-06-16 09:54:28 UTC
Another trivial fix, works as described.

Passing QA
Comment 4 Tomás Cohen Arazi 2022-06-16 12:49:18 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 5 Lucas Gass 2022-07-13 20:01:39 UTC
Backported to 22.05.x for 22.05.03