[Koha-bugs] [Bug 19593] "Delete vendor" button is always set

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Nov 15 22:53:39 CET 2017


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

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |katrin.fischer at bsz-bw.de

--- Comment #1 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
I verified the problem in 16.11.x, but might need some help in order to fix it.


The template expects a variable basketcount to contain the number of linked
baskets. It's undefined in 16.11.x.

The problem is in the API rewrite:

Bug 12896: Move the bookseller-related code into Koha::Acquisition::Bookseller

Changed the code from using GetBookSellerFromId which returned the count, to
use  the new API:

$supplier = Koha::Acquisition::Bookseller->fetch({ id => $booksellerid });
This doesn't return the counts.

The problem doesn't appear in 17.05, because in December after 16.11.x was
released, another heavy change was made that fixed things in the 17.05 branch:

Bug 13726 - Koha::Acquisition::Bookseller should use Koha::Object

It added Koha::Acquisition::Booksellers and fixed the count variables for
baskets and subscriptions.

How to fix?

GetBookSellerFromId is no longer there, but I am also missing the newer methods
used in 17.05:
+    $supplier = Koha::Acquisition::Booksellers->find( $booksellerid );
basketcount   => $supplier->baskets->count,

Dependency trees from that far back are hard to unravel and trying to do so
might cause new bad side effects. I think a 16.11.x specific fix for this
problem only would be preferrable at this point in time.

Can someone help?

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


More information about the Koha-bugs mailing list