Bug 10263

Summary: Add ability to limit which library can edit a bibliographic record
Product: Koha Reporter: Kyle M Hall <kyle.m.hall>
Component: CatalogingAssignee: Kyle M Hall <kyle.m.hall>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P5 - low CC: dcook, gitbot, josef.moravec, jsasse, katrin.fischer, kyle, m.de.rooy, melissa, michaela.sieber
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20256
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28743
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 10278    
Bug Blocks: 10502    
Attachments: Bug 10200 - Bug 10263 - Add ability to limit which branch can edit a bibliographic record ( IndependentBranchesMarcEditing )
Bug 10200 - Bug 10263 - Add ability to limit which branch can edit a bibliographic record ( IndependentBranchesMarcEditing )
Bug 10263 - Add ability to limit which branch can edit a bibliographic record ( IndependentBranchesMarcEditing )
Bug 10263 - Add ability to limit which branch can edit a bibliographic record ( IndependentBranchesMarcEditing )
Bug 10263 - Followup
Bug 10263 - Add ability to limit which branch can edit a bibliographic record ( IndependentBranchesMarcEditing )
Bug 10263 - Add ability to limit which branch can edit a bibliographic record ( IndependentBranchesMarcEditing )
Bug 10263 - Add ability to limit which branch can edit a bibliographic record ( IndependentBranchesMarcEditing )
Bug 10263 - Add ability to limit which branch can edit a bibliographic record ( IndependentBranchesMarcEditing )
Bug 10263 - Add ability to limit which branch can edit a bibliographic record ( IndependentBranchesMarcEditing )
Bug 10263 - Add ability to limit which branch can edit a bibliographic record (IndependentBranchesMarcEditing)

Description Kyle M Hall 2013-05-16 18:20:30 UTC
Right now, it's possible to limit who can edit items by using IndependantBranches. However, Koha has no method of limiting who can edit bibliographic records, as they have no defined owner.
Comment 1 Kyle M Hall 2013-05-16 18:25:43 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2013-05-29 19:31:03 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2013-05-30 14:06:32 UTC Comment hidden (obsolete)
Comment 4 Kyle M Hall 2013-06-11 13:17:47 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall 2013-06-11 14:52:41 UTC Comment hidden (obsolete)
Comment 6 Kyle M Hall 2013-06-11 14:55:15 UTC Comment hidden (obsolete)
Comment 7 Kyle M Hall 2013-09-04 11:14:49 UTC Comment hidden (obsolete)
Comment 8 Kyle M Hall 2013-09-17 16:58:30 UTC Comment hidden (obsolete)
Comment 9 I'm just a bot 2013-09-18 11:17:47 UTC
Applying: Bug 10263 - Add ability to limit which branch can edit a bibliographic record ( IndependentBranchesMarcEditing )
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Bug 10263 - Add ability to limit which branch can edit a bibliographic record ( IndependentBranchesMarcEditing )
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".
Comment 10 Kyle M Hall 2013-12-12 16:33:37 UTC Comment hidden (obsolete)
Comment 11 Kyle M Hall 2013-12-18 15:33:23 UTC Comment hidden (obsolete)
Comment 12 Joel Sasse 2013-12-18 16:41:24 UTC
I tested this and want to sign off on it.

Joel Sasse
Comment 13 Melissa Lefebvre 2013-12-18 16:51:38 UTC
Created attachment 23639 [details] [review]
Bug 10263 - Add ability to limit which branch can edit a bibliographic record (IndependentBranchesMarcEditing)
Comment 14 Katrin Fischer 2013-12-29 16:58:04 UTC
Comment on attachment 23639 [details] [review]
Bug 10263 - Add ability to limit which branch can edit a bibliographic record (IndependentBranchesMarcEditing)

Review of attachment 23639 [details] [review]:
-----------------------------------------------------------------

Doing some code review here too... 

1) I think instead of using a new separate authorised value entry to have an empty option, this could work like the item form. If you mark the subfield mandatory, it will not offer an empty option. If it's not mandatory, it will. But it looks like the rule does not apply to the cataloguing form yet, as 942$c (itemtype) offers an
empty option and is mandatory. Hm.

2) HasIndependentGroupModificationRightsFor needs some unit tests and documentation. Why is $self ignored? 
Why not use GetIndependentGroupModificationRights( { for => $branchcode } );?

3) Spotted another 'old' superlibrarian permission check.

Failing for 2), 3) might be resolved by one of the other dependent patches.

::: C4/Auth.pm
@@ +197,3 @@
>          # to create the template's parameters that will indicate
>          # which menus the user can access.
>          if ( $flags && $flags->{superlibrarian}==1 ) {

Old check for superlibrarian permission.

::: Koha/Template/Plugin/Koha.pm
@@ +44,4 @@
>      return C4::Context->preference( $pref );
>  }
>  
> +sub HasIndependentGroupModificationRightsFor {

POD, UT

::: admin/marc_subfields_structure.pl
@@ +133,4 @@
>          push @authorised_values, $category;
>      }
>      push( @authorised_values, "branches" );
> +    push( @authorised_values, "branches_optional" );

See 1) for an idea to handle this a bit differently.

::: installer/data/mysql/kohastructure.sql
@@ +127,4 @@
>    `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this record was last touched
>    `datecreated` DATE NOT NULL, -- the date this record was added to Koha
>    `abstract` mediumtext, -- summary from the MARC record (520$a in MARC21)
> +  `branchcode` VARCHAR( 10 ) NULL DEFAULT NULL, -- branchcode for the opationl 'owner' of this record.

Small documentation typo.
Comment 15 Katrin Fischer 2023-07-08 15:33:20 UTC

*** This bug has been marked as a duplicate of bug 28743 ***