From 6dc3073bc5ce886fd9f1b0c65d7a1abfc19df1ea Mon Sep 17 00:00:00 2001 From: Elias Date: Mon, 13 Oct 2025 10:03:34 +0000 Subject: [PATCH] Bug 40826: nbofuser increment when importing report from mana Test plan: - Clone the mana repo on your machine (from https://gitlab.com/koha-community/koha-mana) - By default there is no report loaded in mana, so you will want to create sample reports to be able to test the patch. You can simply uncomment the line in the `compose/base.yml`, under db -> volumes to add the sample reports. - Add the bin/mana utility to your path - run `mana up` to launch mana and create a docker network koha will connect to (see how to use the mana utility here : https://gitlab.com/koha-community/koha-mana/-/tree/main/compose?ref_type=heads) - run `ktd --mana up` to connect koha to mana - Select a report already present on the mana instance to verify if the nbofuser will be incremented or create a new one - Import it in koha by searching it's name in the "New SQL from mana" menu - Once imported, check on the mana instance that the nbofuser has been incremented. (on the import SQL from mana menu, or on mana UI available on localhost:5000) --- svc/mana/use | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/svc/mana/use b/svc/mana/use index 446c62e3d5e..37cb3674284 100755 --- a/svc/mana/use +++ b/svc/mana/use @@ -49,6 +49,12 @@ my $resource; if ( $input->param('saveinbase') ) { $resource = { id => $package->new_from_mana( $result->{data} )->id }; + Koha::SharedContent::increment_entity_value( + scalar $input->param('resource'), + scalar $input->param('id'), + 'nbofusers', + 1 + ); } else { $resource = $result->{data}; } -- 2.39.5