Hi, This is absolutely very minor, but I was reading the in-code documentation for update_patrons_category.pl for the --where parameter and I think there is an error/typo. 133 =item B<--where $conditions> 134 135 Use this option to specify a condition built with columns from the borrowers table 136 137 e.g. 138 --where 'email IS NULL' 139 will update all patrons with no value for email 140 141 --where 'categorycode LIKE "%CHILD"' 142 will update all patrons with a category ending in CHILD. 143 144 --where 'categorycode LIKE RESIDENT%' 145 will update all patrons whose category does not begin with RESIDENT. I think this last example should be 144 --where 'categorycode NOT LIKE RESIDENT%' to match with the explanation below I may be wrong, though... I will submit a patch correcting this how I think it should be and I will let the experts verify it to make sure. :) Caroline
Created attachment 126131 [details] [review] Bug 29216: Correct --where documentation in update_patrons_category.pl This patch corrects one of the examples for the --where parameter in the update_patrons_category.pl script. To test: 1. Apply patch 2. In your favourite text editor, open misc/cronjobs/update_patrons_category.pl 3. Look for the documentation for the --where parameter (around line 133 or so) 4. Make sure the examples and their explanations make sense 5. Sign off :)
Created attachment 126231 [details] [review] Bug 29216: Correct --where documentation in update_patrons_category.pl This patch corrects one of the examples for the --where parameter in the update_patrons_category.pl script. To test: 1. Apply patch 2. In your favourite text editor, open misc/cronjobs/update_patrons_category.pl 3. Look for the documentation for the --where parameter (around line 133 or so) 4. Make sure the examples and their explanations make sense 5. Sign off :) Signed-off-by: David Nind <david@davidnind.com>
The two --where examples with categorycode in them don't make sense, you can only define one categorycode to the script with the --from parameter so those examples don't do anything useful and might make the user think it is possible to have wild card selection for the --from category. I think we should just remove those examples instead.
Created attachment 126239 [details] [review] Bug 29216: Correct --where documentation in update_patrons_category.pl This patch removes two misleading examples of the --where parameter documentation in update_patrons_category.pl To test: 1. Apply patch 2. In your favourite text editor, open misc/cronjobs/update_patrons_category.pl 3. Look for the documentation for the --where parameter (around line 133 or so) 4. Make sure the examples and their explanations make sense 5. Sign off :)
Thanks David for signing off and Joonas for double checking. I removed the two examples completely. There is still the --where 'email IS NULL' example to illustrate this parameter.
Caroline thanks! Unfortunately the new patch is based on the now obsoleted patch so it doesn't apply on top of master version. Could you do it on top of master version again and re-submit?
Created attachment 126340 [details] [review] Bug 29216: Correct --where documentation in update_patrons_category.pl This patch removes two misleading examples of the --where parameter documentation in update_patrons_category.pl To test: 1. Apply patch 2. In your favourite text editor, open misc/cronjobs/update_patrons_category.pl 3. Look for the documentation for the --where parameter (around line 133 or so) 4. Make sure the examples and their explanations make sense 5. Sign off :)
Oops! Sorry about that! I don't fully understand how git works, so I make silly mistakes like that... I deleted everything and redid my patch (thankfully, it was just deleting a couple of lines!). Hopefully it will now work... :/
Created attachment 126350 [details] [review] Bug 29216: Correct --where documentation in update_patrons_category.pl This patch removes two misleading examples of the --where parameter documentation in update_patrons_category.pl To test: 1. Apply patch 2. In your favourite text editor, open misc/cronjobs/update_patrons_category.pl 3. Look for the documentation for the --where parameter (around line 133 or so) 4. Make sure the examples and their explanations make sense 5. Sign off :) Signed-off-by: David Nind <david@davidnind.com>
Created attachment 126556 [details] [review] Bug 29216: Correct --where documentation in update_patrons_category.pl This patch removes two misleading examples of the --where parameter documentation in update_patrons_category.pl To test: 1. Apply patch 2. In your favourite text editor, open misc/cronjobs/update_patrons_category.pl 3. Look for the documentation for the --where parameter (around line 133 or so) 4. Make sure the examples and their explanations make sense 5. Sign off :) Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
I would have picked another good example instead of removing it. Not important anyway.
Pushed to master for 21.11, thanks to everybody involved!
Pushed to 21.05.x for 21.05.05
Pushed to 20.11.x for 20.11.11
Created attachment 126815 [details] [review] Bug 29216: Correct --where documentation in update_patrons_category.pl This patch removes two misleading examples of the --where parameter documentation in update_patrons_category.pl To test: 1. Apply patch 2. In your favourite text editor, open misc/cronjobs/update_patrons_category.pl 3. Look for the documentation for the --where parameter (around line 133 or so) 4. Make sure the examples and their explanations make sense 5. Sign off :) Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.
@Jérémy You reoploaded the same patch, did you mean to add a signoff?
(In reply to Victor Grousset/tuxayo from comment #17) > @Jérémy You reoploaded the same patch, did you mean to add a signoff? Yes, sorry for the mistake
Thanks for the additional check, it helps :) The patch has already been integrated in master and the stable branches so don't worry about adding the signoff. For your next signoff, you can check that the line "Signed-off-by YOUR_NAME" is there before attaching a patch by using `git log` or `git show`