[Koha] How to limit number of copies?

Marcel de Rooy M.de.Rooy at rijksmuseum.nl
Fri Jun 30 17:59:46 NZST 2023


Victor,

Please see bug 34146. That code does not use intranetuserjs.
It does use maxlength on the input as suggested by Owen.

Marcel

________________________________
Van: Victor Barroso Oliveira <vbovictor at gmail.com>
Verzonden: donderdag 29 juni 2023 19:02
Aan: Marcel de Rooy <M.de.Rooy at rijksmuseum.nl>
Onderwerp: Re: [Koha] How to limit number of copies?

Hello,
The code inserted in "intranetuserjs" has not limited the number of copies.
I'm using version 21.05.21

Em qui., 29 de jun. de 2023 às 02:44, Marcel de Rooy <M.de.Rooy at rijksmuseum.nl<mailto:M.de.Rooy at rijksmuseum.nl>> escreveu:
Bug 34146, patches attached.
________________________________
Van: Koha <koha-bounces at lists.katipo.co.nz<mailto:koha-bounces at lists.katipo.co.nz>> namens George <gwilliams at nekls.org<mailto:gwilliams at nekls.org>>
Verzonden: woensdag 28 juni 2023 16:07
Aan: koha at lists.katipo.co.nz<mailto:koha at lists.katipo.co.nz> <koha at lists.katipo.co.nz<mailto:koha at lists.katipo.co.nz>>
Onderwerp: Re: [Koha] How to limit number of copies?

Victor,

I'd recommend opening a bug on Bugzilla saying that a system preference
should be added to set the maximum number of copies that can be added to
a bibliographic record when someone uses the "Add multiple copies of
this item" button on additem.pl<http://additem.pl/>.

In the meantime, if you put this jQuery in the intranetuserJS system
preference, it will set the limit to 10 copies:

//Home > Cataloging > Edit TITLE > items
(cataloguing/additem.pl?biblionumber=n<http://additem.pl/?biblionumber=n>)
   //Limit the number of copies that can be added to a biblio using the
"Add multiple copies of this item" button
     $('#cat_additem
#number_of_copies').attr('type','number').attr('max','10');

And I'll add that jQuery to the jQuery library in just a few minutes.

George

On 6/27/2023 7:00 PM, koha-request at lists.katipo.co.nz<mailto:koha-request at lists.katipo.co.nz> wrote:
> Message: 3
> Date: Tue, 27 Jun 2023 15:36:17 -0300
> From: Victor Barroso Oliveira<vbovictor at gmail.com<mailto:vbovictor at gmail.com>>
> To: Koha<koha at lists.katipo.co.nz<mailto:koha at lists.katipo.co.nz>>
> Subject: [Koha] How to limit number of copies?
> Message-ID:
>        <CACyxk604FQOuDbdUVN5pyVvkabRNxGhWZUyWsWvjrr2VppQEvQ at mail.gmail.com<mailto:CACyxk604FQOuDbdUVN5pyVvkabRNxGhWZUyWsWvjrr2VppQEvQ at mail.gmail.com>>
> Content-Type: text/plain; charset="UTF-8"
>
> Hello,
> In Koha it is possible to Add an instance or choose to "Add Multiple
> Copies" simultaneously to a record.
> So far so good. More..... I had a situation where an employee mistakenly
> typed 800,000 copies for a record.
> As a result, when Koha started its automatic Indexing routine, it consumed
> all of the server's memory and crashed system access. When I tried to
> delete the 800,000 copies in batch, the system crashed. It took slow
> deletion from 5,000 to 5,000 to reach 800,000.
> Considering the aforementioned case, would any colleague know if we can
> limit the quantity in the option "Add Multiple Copies"?
> Thanks,
> Victor

--
George Williams
Pronouns: he/him
Next Search Catalog Coordinator
Send NEXT support e-mails to nexthelp at nekls.org<mailto:nexthelp at nekls.org>

NEKLS Office: 785-838-4090
Toll Free: 888-296-6963
Fax: 785-838-3989
Next After-Hours: 785-813-1356

For specific support issues, please use:
Next Catalog Support: nexthelp at nekls.org<mailto:nexthelp at nekls.org>
Courier Support: chandwork at nekls.org<mailto:chandwork at nekls.org>
Technology Support: tech at nekls.org<mailto:tech at nekls.org>

4317 W 6th St, Lawrence, KS, 66049
_______________________________________________

Koha mailing list  https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fkoha-community.org%2F&data=05%7C01%7Cm.de.rooy%40rijksmuseum.nl%7Cfcde12d806124b58f2f308db77e135ab%7C635b05eb66c748e1a94fb4b05a1b058b%7C0%7C0%7C638235581380934868%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=uS9CqOaex9sSU3OWyPNR6t5JoBh0%2F5NJ1ph%2BaWQq1PM%3D&reserved=0<http://koha-community.org/><http://koha-community.org/>
Koha at lists.katipo.co.nz<mailto:Koha at lists.katipo.co.nz>
Unsubscribe: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.katipo.co.nz%2Fmailman%2Flistinfo%2Fkoha&data=05%7C01%7Cm.de.rooy%40rijksmuseum.nl%7Cfcde12d806124b58f2f308db77e135ab%7C635b05eb66c748e1a94fb4b05a1b058b%7C0%7C0%7C638235581380934868%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=c0SNzmie0ykXAzETpOEJubU1%2FixE5Y7nd1x%2F7X97lMg%3D&reserved=0<https://lists.katipo.co.nz/mailman/listinfo/koha><https://lists.katipo.co.nz/mailman/listinfo/koha>
_______________________________________________

Koha mailing list  http://koha-community.org<http://koha-community.org/>
Koha at lists.katipo.co.nz<mailto:Koha at lists.katipo.co.nz>
Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha


More information about the Koha mailing list