[Koha-bugs] [Bug 36155] Improve perfs of suggestion.pl when there are many budgets

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 23 11:22:02 CET 2024


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36155

Pedro Amorim <pedro.amorim at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #162364|0                           |1
        is obsolete|                            |

--- Comment #4 from Pedro Amorim <pedro.amorim at ptfs-europe.com> ---
Created attachment 162371
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162371&action=edit
Bug 36155: Improve perfs of suggestion.pl when there are many budgets

Page suggestion/suggestion.pl always calls GetBudgets() and
GetBudgetHierarchy().
But the result are not always used in template.
When there are many budgets and funds this takes some time.
Also CanUserUseBudget() in a loop should use a unique Koha::Patron unblessed
object of the logged in user.

Test plan :
1) Create a user 'P1' with permissions 'catalogue', 'suggestions_manage'
   and all permissions on acquisition except 'budget_manage_all'
2) Create some funds and subfunds without restricted access
3) Create a fund 'F1' with owner other than 'P1' and restricted access on owner
4) Go to staff interface with patron 'P1'
5) Go to Acquisitions > Suggestions
6) Check you see all founds except F1 in Filter by > Acquisition information
7) Create a new suggestion
8) Check you see all founds except F1 in Fund
9) Select a fund and save
10) Edit this suggestion
11) Check you see all founds except F1 in Fund
12) Compare performance with and without patch with many budgets and funds
    (see test plan of Bug 35921)

Signed-off-by: Pedro Amorim <pedro.amorim at ptfs-europe.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list