New feature to have cataloguing validation workflow (some user validates the cataloguing of others and put the record online in OPAC). The idea is the following: - all framework needs to have suppress subfield hidden - the normal cataloguers uses this frameworks to catalogue the record - the record will not have suppress subfield filled (I don't know what happens when the record has no suppress - if it appears there is the need of set suppress = 1 automatically) - there is special framework with suppress subfield visible - only some users have access to the special framework - those users uses the special framework to validate the cataloguing and set suppress = 0 if everything is OK (after indexation the record appears online in OPAC) To have this working there is the need of a multi system preference with 3 options: 1 - Turn on/off the validation workflow (controll the appearing of the special framework in the dropdown list in addbook.pl and addbiblio.pl, set suppress = 1 if needed, etc) 2 - Set which will be the special framework (text box to set the framework code) 3 - List of users with access to this functionallity separated by comma (can be a permission but if the validation is off the permission has no sense, can be a file in the Koha structure with each username in one line, etc...)
Created attachment 13737 [details] [review] BUG 9163 - Cataloguing validation workflow Added 3 systems preferences instead of one: - 1 to use/not use the validation workflow - 1 to set the validation framework code - 1 to set the users with access to the validation framework addbook.pl and addbiblio.pl show the frameworkcodes in the drop list according to settings: - if validation off shows all - if validation on and framework code is different than validation framework code, shows the framework code - if validation on and framework code equal to validation framework code and the user have permissions, shows the framework code - if validation on and framework code equal to validation framework code and the user doesn't have permissions, don't shows the framework code addbiblio.pl also changed to: - prevent any user to use the validation framework (if validation on) when putting the code in the browser URL - if validation on always set suppress = 1 in framework different than the validating one
Created attachment 13743 [details] [review] BUG 9163 - Patch2 use user permissions instead of systempreferences New user permission added to access the validation framework, under edit catalogue section.
Could you please add a test plan for this patch?
Hi Kyle, Sorry for not having a test plan. This patch was added before the adding of the guidelines for submitting patches. Test plan: - OpacSuppression must be active - set CatalogingValidation on - change all frameworks to have 942$n hidden - create a framework with 942$n visible (this framework will be the validation framework) - set CatalogingValidationFramework = code of validation framework - you will need to users to test (or you will have to change the permissions): set to one for them permissions to access the validation framework - try to catalogue with one user that doesn't have permission : the validation framework shouldn't appear (even on addbiblio.pl and addbook.pl) - try to catalogue with one user that have permissions : the validation framework should appear (even on addbiblio.pl and addbook.pl) - when cataloguing with frameworks different than the validation, the records should be added with 942$n = 1- so the cataloguing is done but needs validation - with the validation framework access the record added, validade the cataloguing and then set the 942$n = 0 - cataloguing validated If you have any question, be free to ask. NOTE: I've saw a error on CataloguingValidation system preference description, but you can correct it: OPACSuppresion -> OpacSuppression The users with access to the validation framework are set in CatalogingValidationUsers -> you can remove this line THANKS Kyle.
Created attachment 16383 [details] [review] BUG 9163 - Cataloguing validation workflow Rebased patch
Created attachment 16384 [details] [review] BUG 9163 - Patch2 use user permissions instead of systempreferences Rebased patch
Testing it on sandbox, when trying to access to Cataloguing, got this error message : Missing right curly or square bracket at /home/koha/src/cataloguing/addbooks.pl line 158, at end of line syntax error at /home/koha/src/cataloguing/addbooks.pl line 158, at EOF Execution of /home/koha/src/cataloguing/addbooks.pl aborted due to compilation errors.
Created attachment 16525 [details] [review] BUG 9163 - Cataloguing validation workflow
Created attachment 16526 [details] [review] BUG 9163 - Patch2 use user permissions instead of systempreferences
Resumbitted patches(In reply to comment #7) > Testing it on sandbox, when trying to access to Cataloguing, got this error > message : > Missing right curly or square bracket at > /home/koha/src/cataloguing/addbooks.pl line 158, at end of line > syntax error at /home/koha/src/cataloguing/addbooks.pl line 158, at EOF > Execution of /home/koha/src/cataloguing/addbooks.pl aborted due to > compilation errors. Corrected
Testing on sandbox, did not work cause of : Applying: BUG 9163 - Cataloguing validation workflow Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging installer/data/mysql/sysprefs.sql CONFLICT (content): Merge conflict in installer/data/mysql/sysprefs.sql Auto-merging installer/data/mysql/updatedatabase.pl CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl Failed to merge in the changes.
Created attachment 16605 [details] [review] patch rebased patch rebased ready to be tested
Created attachment 16619 [details] [review] second patch rebased 2° patch rebased
Created attachment 16675 [details] [review] patch rebased first patch rebased due to a lack of a bracket
Test on sandbox : Something went wrong ! Applying: BUG 9163 - Patch2 use user permissions instead of systempreferences Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 BUG 9163 - Patch2 use user permissions instead of systempreferences When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". Bug 9163 - Cataloguing validation workflow second patch rebased Apply? [yn] Patch left in /tmp/second-patch-rebased-FeeYi6.patch
Created attachment 19270 [details] [review] BUG 9163 - Cataloguing validation workflow Added 3 systems preferences instead of one: - 1 to use/not use the validation workflow - 1 to set the validation framework code - 1 to set the users with access to the validation framework addbook.pl and addbiblio.pl show the frameworkcodes in the drop list according to settings: - if validation off shows all - if validation on and framework code is different than validation framework code, shows the framework code - if validation on and framework code equal to validation framework code and the user have permissions, shows the framework code - if validation on and framework code equal to validation framework code and the user doesn't have permissions, don't shows the framework code addbiblio.pl also changed to: - prevent any user to use the validation framework (if validation on) when putting the code in the browser URL - if validation on always set suppress = 1 in framework different than the validating one
Created attachment 19271 [details] [review] BUG 9163 - Patch2 use user permissions instead of systempreferences New user permission added to access the validation framework, under edit catalogue section.
Fix patches order + rebase.
Applying: BUG 9163 - Cataloguing validation workflow Using index info to reconstruct a base tree... M cataloguing/addbiblio.pl M cataloguing/addbooks.pl M installer/data/mysql/sysprefs.sql M installer/data/mysql/updatedatabase.pl Falling back to patching base and 3-way merge... Auto-merging installer/data/mysql/updatedatabase.pl Auto-merging installer/data/mysql/sysprefs.sql CONFLICT (content): Merge conflict in installer/data/mysql/sysprefs.sql Auto-merging cataloguing/addbooks.pl Auto-merging cataloguing/addbiblio.pl Patch failed at 0001 BUG 9163 - Cataloguing validation workflow The copy of the patch that failed is found in: /home/christopher/git/koha/.git/rebase-apply/patch When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".
I am rebasing the patches
Created attachment 21192 [details] [review] BUG 9163 - Cataloguing validation workflow Rebased master
Created attachment 21194 [details] [review] BUG 9163 - Patch2 use user permissions instead of systempreferences Rebased master
Patch applied cleanly, go forth and signoff
When using the sandbox to try and test this, I tried searching for 'test' before proceeding with the test plan and got this error message: Error: Can't call method "raw" on an undefined value at /home/koha/src/C4/Search.pm line 490. I do not get this if I build a sandbox from "msster" instead of "9163". I subsequently tried to follow the test plan and got to the point of checking to see if I can see the new record and get the error above. Could you review the test plan in light of the fact that you are now using user permissions. I think I did the right thing here but it would be good to have more explicit instructions. Also there are a few options for visibility in the framework and for access under cataloging for user permissions. Being more precise with how those should be set would be good.
(In reply to Doug Kingston from comment #24) > When using the sandbox to try and test this, I tried searching for 'test' > before proceeding with the test plan and got this error message: > Error: Can't call method "raw" on an undefined value at > /home/koha/src/C4/Search.pm line 490. This is a known bug, it means there is no results, for a search with a sort order not on relevance.
(In reply to Fridolin SOMERS from comment #26) > (In reply to Doug Kingston from comment #24) > > When using the sandbox to try and test this, I tried searching for 'test' > > before proceeding with the test plan and got this error message: > > Error: Can't call method "raw" on an undefined value at > > /home/koha/src/C4/Search.pm line 490. > This is a known bug, it means there is no results, for a search with a sort > order not on relevance. Indeed: See bug 9578
I'd be happy to test and get this moving again but needs rebase Applying: BUG 9163 - Cataloguing validation workflow Using index info to reconstruct a base tree... Falling back to patching base and 3-way merge... Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref Auto-merging installer/data/mysql/updatedatabase.pl Auto-merging installer/data/mysql/sysprefs.sql Auto-merging cataloguing/addbooks.pl Auto-merging cataloguing/addbiblio.pl Failed to merge in the changes. Patch failed at 0001 BUG 9163 - Cataloguing validation workflow 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-9163---Cataloguing-validation-workflow-_DFxmQ.patch
Created attachment 45474 [details] [review] BUG 9163 - Cataloguing validation workflow Added 3 systems preferences instead of one: - 1 to use/not use the validation workflow - 1 to set the validation framework code - 1 to set the users with access to the validation framework addbook.pl and addbiblio.pl show the frameworkcodes in the drop list according to settings: - if validation off shows all - if validation on and framework code is different than validation framework code, shows the framework code - if validation on and framework code equal to validation framework code and the user have permissions, shows the framework code - if validation on and framework code equal to validation framework code and the user doesn't have permissions, don't shows the framework code addbiblio.pl also changed to: - prevent any user to use the validation framework (if validation on) when putting the code in the browser URL - if validation on always set suppress = 1 in framework different than the validating one
Created attachment 45475 [details] [review] BUG 9163 - Patch2 use user permissions instead of systempreferences New user permission added to access the validation framework, under edit catalogue section.
Patch rebased.
Tested on sandbox, unimarc and marc21 "- The users with access to the validation framework are set in CatalogingValidationUsers." : this text in CatalogingValidation description should be removed or replaced with something like "Users with access to the validation framework should have the cataloging_validation_framework permission" The cataloging_validation_framework permission does not exist at all I feel disturbing that suppress=1 is set on 942$n in the code : that means that this will work only for marc21 configuration. How about unimarc ? I think it would be better to be able configure the framework field/subfield concerned with suppress status