Bug 32773 - Have the ability to have more than 1 Fast Add framework
Summary: Have the ability to have more than 1 Fast Add framework
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Brendan Lawlor
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-31 22:03 UTC by George Williams (NEKLS)
Modified: 2024-11-05 22:16 UTC (History)
12 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 32773: Add AllowAsFastAddFrameworks system preference (4.32 KB, patch)
2024-10-25 17:42 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 32773: Add AllowAsFastAddFrameworks system preference (5.57 KB, patch)
2024-10-26 12:30 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 32773: add column biblio_framework.is_fast_add (2.31 KB, patch)
2024-11-01 17:23 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 32773: add ability to set biblio_framework.is_fast_add (3.40 KB, patch)
2024-11-01 17:23 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 32773: schema update [DO NOT PUSH] (3.61 KB, patch)
2024-11-01 17:23 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 32773: update change framework dropdown (3.60 KB, patch)
2024-11-01 17:23 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 32773: Add fast cataloging support for multiple frameworks (7.04 KB, patch)
2024-11-01 17:23 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 32773: perltidy (2.89 KB, patch)
2024-11-01 17:23 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 32773: Add column biblio_framework.is_fast_add (2.31 KB, patch)
2024-11-05 00:57 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 32773: Add ability to set biblio_framework.is_fast_add (3.40 KB, patch)
2024-11-05 00:57 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 32773: schema update [DO NOT PUSH] (3.61 KB, patch)
2024-11-05 00:57 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 32773: Update change framework dropdown (3.60 KB, patch)
2024-11-05 00:57 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 32773: Add fast cataloging support for multiple frameworks (7.17 KB, patch)
2024-11-05 00:57 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 32773: Add editing support for is_fast_add frameworks (8.63 KB, patch)
2024-11-05 00:57 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 32773: (follow-up) perltidy (4.66 KB, patch)
2024-11-05 00:57 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 32773: Separate Fast Add frameworks in drop down menu on cataloging-home (3.36 KB, patch)
2024-11-05 00:57 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 32773: Add column biblio_framework.is_fast_add (2.37 KB, patch)
2024-11-05 19:14 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 32773: Add ability to set biblio_framework.is_fast_add (3.46 KB, patch)
2024-11-05 19:14 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 32773: schema update [DO NOT PUSH] (3.67 KB, patch)
2024-11-05 19:14 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 32773: Update change framework dropdown (3.67 KB, patch)
2024-11-05 19:14 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 32773: Add fast cataloging support for multiple frameworks (7.24 KB, patch)
2024-11-05 19:14 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 32773: Add editing support for is_fast_add frameworks (8.69 KB, patch)
2024-11-05 19:14 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 32773: (follow-up) perltidy (4.05 KB, patch)
2024-11-05 19:15 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 32773: Separate Fast Add frameworks in drop down menu on cataloging-home (3.43 KB, patch)
2024-11-05 19:15 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description George Williams (NEKLS) 2023-01-31 22:03:29 UTC
Currently the only fast add framework is the FA framework.  I'd like the ability to create new/additional frameworks and designate them as fast add frameworks too.
Comment 1 Miranda Nero 2023-09-22 19:50:02 UTC
We would also like this. We have the majority of our libraries use the FA framework when creating new records, so it would be great to have the option to pre-fill fields based on format with different FA frameworks.
Comment 2 Angela Berrett 2024-06-07 19:28:51 UTC
We would also like to see this - we have several projects being done by vendors or non-cataloger groups and each needs specific fields in a FA framework.  We don't want to give any of them full cataloging rights. Having a specific framework for each project would be extremely helpful.
Comment 3 Christopher Brannon 2024-10-24 16:31:19 UTC
We would like this.  We use it for ILL workflow, so having more than one framework would really help in this.
Comment 4 Nancy M. 2024-10-24 16:47:05 UTC
CLAMS really needs this option too. We need the ability for our libraries to be able to maintain their Library of Things records without asking central cataloging to add and delete bib information.
Comment 5 Brendan Lawlor 2024-10-25 17:42:36 UTC
Created attachment 173401 [details] [review]
Bug 32773: Add AllowAsFastAddFrameworks system preference

This patch adds a new multiselect system preference that
allows making selections from a list of biblioframeworks

To test:
1. Apply patch
2. Update database
    perl installer/data/mysql/updatedatabase.pl
3. Search System preferences for 'AllowAsFastAddFrameworks'
4. See the dropdown list is populated from bibliographic frameworks
5. Go to Administration > MARC Bibliographic frameworks
    add a new framework
6. Confirm the new option is available in 'AllowAsFastAddFramework'
Comment 6 Brendan Lawlor 2024-10-25 17:48:34 UTC
Posting work in progress for feedback.

My idea is that admins could select specific bibliographic frameworks in the AllowAsFastAddFramework preference and then we could make those forms available to users who only have the fast_cataloging permission.

They would be able to use the same dropdown to change the framework, but instead of really changing the framework it would just change the form they use.

Then when the record is added it would still be saved with the FA code to indicate that it was added via fast cataloging.
Comment 7 Brendan Lawlor 2024-10-26 12:30:05 UTC
Created attachment 173417 [details] [review]
Bug 32773: Add AllowAsFastAddFrameworks system preference

This patch adds a new multiselect system preference that
allows making selections from a list of biblioframeworks

To test:
1. Apply patch
2. Update database
    perl installer/data/mysql/updatedatabase.pl
3. Search System preferences for 'AllowAsFastAddFrameworks'
4. See the dropdown list is populated from bibliographic frameworks
5. Go to Administration > MARC Bibliographic frameworks
    add a new framework
6. Confirm the new option is available in 'AllowAsFastAddFrameworks'
Comment 8 David Nind 2024-10-31 00:45:26 UTC
I did a quick test, things look good so far!

Some notes:

1. Bibliographic framework code: currently this is only 4 characters long. I think it may need to be longer to make the codes more meaningful, depending on how libraries want to name their fast add frameworks, for example FA-DVD, FA-BOOK, FA-JOURNAL, wouldn't work. But maybe not an issue, as when selecting frameworks in the record editor it displays and sorts by the framework description.

2. Selecting the fast add framework to use: I'm assuming the staff member would select from the current 'Settings' menu option when adding a record. Some ideas:
  - Maybe having another menu with 'Select fast add framework' could be an option.
  - Alternatively, when there is more than one fast add framework the staff member gets a dialog box to select the fast add framework before the add record form
  - Related to this, maybe have some way to select a default framework.

3. Permissions: assuming here that there is still some work to be done for this to work.

4. Database update: default for the new preference - it is set to NULL. Once permissions are done, for existing installations would they have to set this manually? Otherwise this would break how Koha knows what the fast add framework is - is it hard coded as FA?. Not sure how this works.
Comment 9 Brendan Lawlor 2024-11-01 17:23:44 UTC
Created attachment 173878 [details] [review]
Bug 32773: add column biblio_framework.is_fast_add
Comment 10 Brendan Lawlor 2024-11-01 17:23:47 UTC
Created attachment 173879 [details] [review]
Bug 32773: add ability to set biblio_framework.is_fast_add
Comment 11 Brendan Lawlor 2024-11-01 17:23:49 UTC
Created attachment 173880 [details] [review]
Bug 32773: schema update [DO NOT PUSH]
Comment 12 Brendan Lawlor 2024-11-01 17:23:52 UTC
Created attachment 173881 [details] [review]
Bug 32773: update change framework dropdown
Comment 13 Brendan Lawlor 2024-11-01 17:23:54 UTC
Created attachment 173882 [details] [review]
Bug 32773: Add fast cataloging support for multiple frameworks

This set of patches adds a new is_fast_add column to biblio_framework.
In Admin > MARC bibliographic frameworks admin users can add or edit
frameworks to be used as Fast Add frameworks.
Users with only fast_cataloging permission will be able to add records
using those frameworks in the Fast Cataloging module.

Test plan:
Apply patches, restart_all and updatedatabase
1. Go to Admin > MARC Bibliographic frameworks
2. Edit/create a new framework and check the 'Use as Fast Add Framework' box
3. Also edit a framework and uncheck the 'Use as Fast Add Framework' box
4. Notice a 'Fast Add' badge is displayed in the table
5. Create a staff user with only fast_cataloging permissions
6. Log in as that user and go to Cataloging > Fast Cataloging
7. Confirm you can add a Fast Add record and items
8. Use the 'Settings' drop down to Change Fast Add framework
9. Confirm you see the frameworks that you set as Fast Add earlier
10. Confirm you can add the reocord and items
11. Log in as a superlibrarian and confirm that you can add records and items
 using standard frameworks and frameworks set as fast add

Sponsored-by: CLAMS
Comment 14 Brendan Lawlor 2024-11-01 17:23:56 UTC
Created attachment 173883 [details] [review]
Bug 32773: perltidy
Comment 15 Brendan Lawlor 2024-11-01 17:40:06 UTC
Thanks for testing David!

Also big thanks to Nick for chatting about this, which helped me to realize adding a column is a better way to achieve this.

(In reply to David Nind from comment #8)
> I did a quick test, things look good so far!
> 
> Some notes:
> 
> 1. Bibliographic framework code: currently this is only 4 characters long. I
> think it may need to be longer to make the codes more meaningful, depending
> on how libraries want to name their fast add frameworks

Good point. I didn't include this because I'm new to making database changes and wanted to keep it simple

> 
> 2. Selecting the fast add framework to use: I'm assuming the staff member
> would select from the current 'Settings' menu option when adding a record.
> Some ideas:
>   - Maybe having another menu with 'Select fast add framework' could be an
> option.

You read my mind and this is included. This is exactly how I thought it would be best for the UI.

>   - Alternatively, when there is more than one fast add framework the staff
> member gets a dialog box to select the fast add framework before the add
> record form
I think this is a good idea to enhance this further, for now it defaults to the default Fast Add and users can switch framework in the settings drop down.

>   - Related to this, maybe have some way to select a default framework.
I'm not sure, but maybe this would be best implemented as a system preference where you can select a single framework

> 3. Permissions: assuming here that there is still some work to be done for
> this to work.
This makes a couple changes to conditionals that set or check permissions so it's a good thing to keep an eye on when testing. 
 
> 4. Database update: default for the new [column]
Only the 'FA' framework sets is_fast_add = 1
All other frameworks default to is_fast_add = 0
Comment 16 David Nind 2024-11-01 18:29:23 UTC
Thanks Brendan!

I've re-tested, and it's all looking pretty good - pragmatic, works as described.

My only suggestion at this stage would be on the "New framework" form - change "Use as Fast Add Framework" to "Use as a Fast Add framework".


David
Comment 17 Brendan Lawlor 2024-11-01 18:46:25 UTC
Cool! Thanks David!

I removed the needs sign off status because I noticed a bug in editing the records that obviously needs to be fixed.

I will work on it some more next week and also make the change to the wording as you suggest.
Comment 18 Brendan Lawlor 2024-11-05 00:57:20 UTC
Created attachment 173954 [details] [review]
Bug 32773: Add column biblio_framework.is_fast_add
Comment 19 Brendan Lawlor 2024-11-05 00:57:23 UTC
Created attachment 173955 [details] [review]
Bug 32773: Add ability to set biblio_framework.is_fast_add
Comment 20 Brendan Lawlor 2024-11-05 00:57:26 UTC
Created attachment 173956 [details] [review]
Bug 32773: schema update [DO NOT PUSH]
Comment 21 Brendan Lawlor 2024-11-05 00:57:29 UTC
Created attachment 173957 [details] [review]
Bug 32773: Update change framework dropdown
Comment 22 Brendan Lawlor 2024-11-05 00:57:31 UTC
Created attachment 173958 [details] [review]
Bug 32773: Add fast cataloging support for multiple frameworks

This set of patches adds a new is_fast_add column to biblio_framework.
In Admin > MARC bibliographic frameworks admin users can add or edit
frameworks to be used as Fast Add frameworks.
Users with only fast_cataloging permission will be able to add records
using those frameworks in the Fast Cataloging module.

Test plan:
Apply patches, restart_all and updatedatabase
1. Go to Admin > MARC Bibliographic frameworks
2. Edit/create a new framework and check the 'Use as Fast Add Framework' box
3. Also edit a framework and uncheck the 'Use as Fast Add Framework' box
4. Notice a 'Fast Add' badge is displayed in the table
5. Create a staff user with only fast_cataloging permissions
6. Log in as that user and go to Cataloging > Fast Cataloging
7. Confirm you can add a Fast Add record and items
8. Use the 'Settings' drop down to Change Fast Add framework
9. Confirm you see the frameworks that you set as Fast Add earlier
10. Confirm you can add the reocord and items
11. Log in as a superlibrarian and confirm that you can add records and items
 using standard frameworks and frameworks set as fast add

Sponsored-by: CLAMS
Comment 23 Brendan Lawlor 2024-11-05 00:57:34 UTC
Created attachment 173959 [details] [review]
Bug 32773: Add editing support for is_fast_add frameworks

This patch uses the biblionumber to set is_fast_add on the catalog
details page which is used to determine if the Edit button should be
rendered in the cataloging toolbar. It updates the Biblio.pm subroutine
can_be_edited to check if the biblio frameworkcode is 'FA' or if the
biblio framework is_fast_add = 1.

To test:
1. Set some biblio frameworks as Fast Add frameworks
2. Login as a user with fast_cataloging permissions only
3. Create and edit different types of Fast Add records
4. Add items and edit items
5. Confirm that you can only edit bibs and items
  for bibs where the framework is set as a Fast Add framework
  and the item is from your home library.
6. Log in as a superlibrarian
7. Confirm you can still create and edit records with the Default
  and other frameworks
8. Change a record's framework from a Fast Add to Default
9. Login as the user with only fast_cataloging confirm that you can
  no longer edit that record or its items
Comment 24 Brendan Lawlor 2024-11-05 00:57:36 UTC
Created attachment 173960 [details] [review]
Bug 32773: (follow-up) perltidy
Comment 25 Brendan Lawlor 2024-11-05 00:57:39 UTC
Created attachment 173961 [details] [review]
Bug 32773: Separate Fast Add frameworks in drop down menu on cataloging-home

This patch updates the new record drop down menus on cataloging-home to separate
Fast Add frameworks under a new header at the bottom.
Comment 26 Eileen Chandler 2024-11-05 14:32:50 UTC
We really need a choice of multiple fast add frameworks - one does not do the job.  Our library catalogers would like a Fast Add for Library of Things, one for Non print, e.g. DVDS, and for various formats where we can prefill the Fast add based on material type.
Comment 27 Andrew Fuerste-Henry 2024-11-05 19:14:46 UTC
Created attachment 174028 [details] [review]
Bug 32773: Add column biblio_framework.is_fast_add

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 28 Andrew Fuerste-Henry 2024-11-05 19:14:49 UTC
Created attachment 174029 [details] [review]
Bug 32773: Add ability to set biblio_framework.is_fast_add

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 29 Andrew Fuerste-Henry 2024-11-05 19:14:51 UTC
Created attachment 174030 [details] [review]
Bug 32773: schema update [DO NOT PUSH]

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 30 Andrew Fuerste-Henry 2024-11-05 19:14:54 UTC
Created attachment 174031 [details] [review]
Bug 32773: Update change framework dropdown

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 31 Andrew Fuerste-Henry 2024-11-05 19:14:57 UTC
Created attachment 174032 [details] [review]
Bug 32773: Add fast cataloging support for multiple frameworks

This set of patches adds a new is_fast_add column to biblio_framework.
In Admin > MARC bibliographic frameworks admin users can add or edit
frameworks to be used as Fast Add frameworks.
Users with only fast_cataloging permission will be able to add records
using those frameworks in the Fast Cataloging module.

Test plan:
Apply patches, restart_all and updatedatabase
1. Go to Admin > MARC Bibliographic frameworks
2. Edit/create a new framework and check the 'Use as Fast Add Framework' box
3. Also edit a framework and uncheck the 'Use as Fast Add Framework' box
4. Notice a 'Fast Add' badge is displayed in the table
5. Create a staff user with only fast_cataloging permissions
6. Log in as that user and go to Cataloging > Fast Cataloging
7. Confirm you can add a Fast Add record and items
8. Use the 'Settings' drop down to Change Fast Add framework
9. Confirm you see the frameworks that you set as Fast Add earlier
10. Confirm you can add the reocord and items
11. Log in as a superlibrarian and confirm that you can add records and items
 using standard frameworks and frameworks set as fast add

Sponsored-by: CLAMS
Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 32 Andrew Fuerste-Henry 2024-11-05 19:14:59 UTC
Created attachment 174033 [details] [review]
Bug 32773: Add editing support for is_fast_add frameworks

This patch uses the biblionumber to set is_fast_add on the catalog
details page which is used to determine if the Edit button should be
rendered in the cataloging toolbar. It updates the Biblio.pm subroutine
can_be_edited to check if the biblio frameworkcode is 'FA' or if the
biblio framework is_fast_add = 1.

To test:
1. Set some biblio frameworks as Fast Add frameworks
2. Login as a user with fast_cataloging permissions only
3. Create and edit different types of Fast Add records
4. Add items and edit items
5. Confirm that you can only edit bibs and items
  for bibs where the framework is set as a Fast Add framework
  and the item is from your home library.
6. Log in as a superlibrarian
7. Confirm you can still create and edit records with the Default
  and other frameworks
8. Change a record's framework from a Fast Add to Default
9. Login as the user with only fast_cataloging confirm that you can
  no longer edit that record or its items

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 33 Andrew Fuerste-Henry 2024-11-05 19:15:02 UTC
Created attachment 174034 [details] [review]
Bug 32773: (follow-up) perltidy

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 34 Andrew Fuerste-Henry 2024-11-05 19:15:05 UTC
Created attachment 174035 [details] [review]
Bug 32773: Separate Fast Add frameworks in drop down menu on cataloging-home

This patch updates the new record drop down menus on cataloging-home to separate
Fast Add frameworks under a new header at the bottom.

Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com>
Comment 35 Andrew Fuerste-Henry 2024-11-05 19:18:12 UTC
This worked as described and I'm signing it off. 
That said, should we not set biblio_framework.is_fast_add=1 for the FA framework as part of this patch? It's confusing that the standard FA framework doesn't end up with a little "Fast Add" label on /koha/admin/biblio_framework.pl or show with the custom fast add frameworks on the record edit screen.
Comment 36 Brendan Lawlor 2024-11-05 19:43:24 UTC
Thanks Andrew!

The atomic update sets is_fast_add = 1 where frameworkcode = 'FA', but I wasn't sure if/how to set a default value for that in kohastructure.sql. It's my first time updating the database so I'm not 100% sure about that part. 

It can be handy setting it manually using ktd --dbshell
 UPDATE biblio_framework SET is_fast_add = 1 where frameworkcode = 'FA';

In ktd --shell if you run updatedatabase I think it sets it correctly.

I agree that the standard FA framework deserves a little badge and should display under change Fast Add frameworks menu too. This is how it works when the data is correctly is_fast_add = 1 for 'FA'
Comment 37 Andrew Fuerste-Henry 2024-11-05 22:16:37 UTC
(In reply to Brendan Lawlor from comment #36)
> In ktd --shell if you run updatedatabase I think it sets it correctly.

I just confirmed that this is the case. After applying the patch and running updatedatabase, the FA framework is properly marked as a fast add. I must have done something odd when testing earlier.