Bug 33483 - Cannot link EBSCO's package with local agreement
Summary: Cannot link EBSCO's package with local agreement
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: ERM (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low critical (vote)
Assignee: Jonathan Druart
QA Contact:
URL:
Keywords:
: 33529 (view as bug list)
Depends on: 33066
Blocks: 33507 33416 33490 33491
  Show dependency treegraph
 
Reported: 2023-04-11 12:13 UTC by Jonathan Druart
Modified: 2024-04-17 10:33 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.06


Attachments
Bug 33483: Fix link EBSCO package with local agreements (1.30 KB, patch)
2023-04-11 12:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33483: Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not (3.75 KB, patch)
2023-04-11 16:34 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 33483: Fix link EBSCO package with local agreements (1.36 KB, patch)
2023-04-11 17:20 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 33483: Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not (3.75 KB, patch)
2023-04-11 17:20 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 33483: Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not (3.82 KB, patch)
2023-04-11 19:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33483: Make KohaTable accept customizable actions button (3.62 KB, patch)
2023-04-11 19:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33483: Restore 'select' (2.66 KB, patch)
2023-04-11 19:16 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33483: (follow-up) Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not (1.08 KB, patch)
2023-04-11 19:20 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33483: Make KohaTable accept customizable actions button (3.06 KB, patch)
2023-04-12 11:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33483: Restore 'select' (2.66 KB, patch)
2023-04-12 11:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33483: (follow-up) Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not (1.08 KB, patch)
2023-04-12 11:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33483: Prevent 400 when more than 1 agreement is linked (1.33 KB, patch)
2023-04-12 15:00 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33483: Fix link EBSCO package with local agreements (1.36 KB, patch)
2023-04-12 15:27 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 33483: Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not (3.87 KB, patch)
2023-04-12 15:27 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 33483: Make KohaTable accept customizable actions button (3.12 KB, patch)
2023-04-12 15:27 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 33483: Restore 'select' (2.72 KB, patch)
2023-04-12 15:27 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 33483: (follow-up) Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not (1.14 KB, patch)
2023-04-12 15:27 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 33483: Prevent 400 when more than 1 agreement is linked (1.39 KB, patch)
2023-04-12 15:27 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 33483: Fix link EBSCO package with local agreements (1.42 KB, patch)
2023-04-19 09:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 33483: Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not (3.93 KB, patch)
2023-04-19 09:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 33483: Make KohaTable accept customizable actions button (3.18 KB, patch)
2023-04-19 09:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 33483: Restore 'select' (2.78 KB, patch)
2023-04-19 09:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 33483: (follow-up) Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not (1.20 KB, patch)
2023-04-19 09:38 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 33483: Prevent 400 when more than 1 agreement is linked (1.45 KB, patch)
2023-04-19 09:38 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2023-04-11 12:13:20 UTC
The modal opens empty with "Loading..."
Comment 1 Jonathan Druart 2023-04-11 12:15:21 UTC
Created attachment 149437 [details] [review]
Bug 33483: Fix link EBSCO package with local agreements

Bug 33066 broke that, we need to set 'initialized'.

Test plan:
Turn on EBSCO provider, search for a package and click "Add new
agreement". The modal must open with the list of agreements.
Comment 2 Pedro Amorim 2023-04-11 16:34:02 UTC
Created attachment 149452 [details] [review]
Bug 33483: Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not
Comment 3 Pedro Amorim 2023-04-11 17:20:12 UTC
Created attachment 149455 [details] [review]
Bug 33483: Fix link EBSCO package with local agreements

Bug 33066 broke that, we need to set 'initialized'.

Test plan:
Turn on EBSCO provider, search for a package and click "Add new
agreement". The modal must open with the list of agreements.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 4 Pedro Amorim 2023-04-11 17:20:14 UTC
Created attachment 149456 [details] [review]
Bug 33483: Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not
Comment 5 Jonathan Druart 2023-04-11 19:16:06 UTC
Created attachment 149470 [details] [review]
Bug 33483: Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Jonathan Druart 2023-04-11 19:16:09 UTC
Created attachment 149471 [details] [review]
Bug 33483: Make KohaTable accept customizable actions button

We have hardcoded some buttons: edit, delete
But we could need specific buttons.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Jonathan Druart 2023-04-11 19:16:12 UTC
Created attachment 149472 [details] [review]
Bug 33483: Restore 'select'

We are not supposed to see edit and delete buttons, but select instead,
to pick an agreement.

Regression introduced by
  commit 809f90d394fdef8142fdf8f4a6e825dc14a132d4
  Bug 33066: Remove build_datatable

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Jonathan Druart 2023-04-11 19:20:03 UTC
Created attachment 149473 [details] [review]
Bug 33483: (follow-up) Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not
Comment 9 Jonathan Druart 2023-04-12 11:41:20 UTC
Created attachment 149527 [details] [review]
Bug 33483: Make KohaTable accept customizable actions button

We have hardcoded some buttons: edit, delete
But we could need specific buttons.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 10 Jonathan Druart 2023-04-12 11:41:23 UTC
Created attachment 149528 [details] [review]
Bug 33483: Restore 'select'

We are not supposed to see edit and delete buttons, but select instead,
to pick an agreement.

Regression introduced by
  commit 809f90d394fdef8142fdf8f4a6e825dc14a132d4
  Bug 33066: Remove build_datatable

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 11 Jonathan Druart 2023-04-12 11:41:26 UTC
Created attachment 149529 [details] [review]
Bug 33483: (follow-up) Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not
Comment 12 Pedro Amorim 2023-04-12 14:43:41 UTC
I think there's a bug when adding more than one agreement to an EBSCO package (getting error 400 but need to double-check this), I also think we should only list agreements that are not already related to said package, i.e. when adding subsequent agreements to the same packages, the ones already related do not show up in the "to-relate" list. Working on this.
Comment 13 Jonathan Druart 2023-04-12 15:00:20 UTC
Created attachment 149555 [details] [review]
Bug 33483: Prevent 400 when more than 1 agreement is linked

We were passing package_agreements.agreement and the server returned
Object { message: "Properties not allowed: agreement.", path: "/body/package_agreements/0" }
Comment 14 Pedro Amorim 2023-04-12 15:27:36 UTC
Created attachment 149564 [details] [review]
Bug 33483: Fix link EBSCO package with local agreements

Bug 33066 broke that, we need to set 'initialized'.

Test plan:
Turn on EBSCO provider, search for a package and click "Add new
agreement". The modal must open with the list of agreements.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 15 Pedro Amorim 2023-04-12 15:27:39 UTC
Created attachment 149565 [details] [review]
Bug 33483: Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 16 Pedro Amorim 2023-04-12 15:27:42 UTC
Created attachment 149566 [details] [review]
Bug 33483: Make KohaTable accept customizable actions button

We have hardcoded some buttons: edit, delete
But we could need specific buttons.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 17 Pedro Amorim 2023-04-12 15:27:44 UTC
Created attachment 149567 [details] [review]
Bug 33483: Restore 'select'

We are not supposed to see edit and delete buttons, but select instead,
to pick an agreement.

Regression introduced by
  commit 809f90d394fdef8142fdf8f4a6e825dc14a132d4
  Bug 33066: Remove build_datatable

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 18 Pedro Amorim 2023-04-12 15:27:47 UTC
Created attachment 149568 [details] [review]
Bug 33483: (follow-up) Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 19 Pedro Amorim 2023-04-12 15:27:50 UTC
Created attachment 149569 [details] [review]
Bug 33483: Prevent 400 when more than 1 agreement is linked

We were passing package_agreements.agreement and the server returned
Object { message: "Properties not allowed: agreement.", path: "/body/package_agreements/0" }

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 20 Pedro Amorim 2023-04-12 15:28:29 UTC
Tested last patch, can confirm it fixes the 400 error when adding a 2nd agreement to an EBSCO package.
Comment 21 Martin Renvoize 2023-04-13 13:56:39 UTC
Hmmm.. I'd love to see some tests around this whole area...
Comment 22 Jonathan Druart 2023-04-13 14:18:43 UTC
(In reply to Martin Renvoize from comment #21)
> Hmmm.. I'd love to see some tests around this whole area...

See bug 33492.
Comment 23 Matt Blenkinsop 2023-04-14 07:59:12 UTC
*** Bug 33529 has been marked as a duplicate of this bug. ***
Comment 24 Jonathan Druart 2023-04-17 20:00:45 UTC
(In reply to Martin Renvoize from comment #21)
> Hmmm.. I'd love to see some tests around this whole area...

And also note that these patches are actually fixing several tests that are currently failing on master.
Comment 25 Jonathan Druart 2023-04-17 20:01:08 UTC
We really need this ASAP.
Comment 26 Martin Renvoize 2023-04-19 09:38:23 UTC
Created attachment 149847 [details] [review]
Bug 33483: Fix link EBSCO package with local agreements

Bug 33066 broke that, we need to set 'initialized'.

Test plan:
Turn on EBSCO provider, search for a package and click "Add new
agreement". The modal must open with the list of agreements.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 27 Martin Renvoize 2023-04-19 09:38:26 UTC
Created attachment 149848 [details] [review]
Bug 33483: Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 28 Martin Renvoize 2023-04-19 09:38:28 UTC
Created attachment 149849 [details] [review]
Bug 33483: Make KohaTable accept customizable actions button

We have hardcoded some buttons: edit, delete
But we could need specific buttons.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 29 Martin Renvoize 2023-04-19 09:38:31 UTC
Created attachment 149850 [details] [review]
Bug 33483: Restore 'select'

We are not supposed to see edit and delete buttons, but select instead,
to pick an agreement.

Regression introduced by
  commit 809f90d394fdef8142fdf8f4a6e825dc14a132d4
  Bug 33066: Remove build_datatable

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 30 Martin Renvoize 2023-04-19 09:38:34 UTC
Created attachment 149851 [details] [review]
Bug 33483: (follow-up) Update the way we distinguish if AgreementsList is called from EHoldingsEBSCOPackageAgreements or not

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 31 Martin Renvoize 2023-04-19 09:38:37 UTC
Created attachment 149852 [details] [review]
Bug 33483: Prevent 400 when more than 1 agreement is linked

We were passing package_agreements.agreement and the server returned
Object { message: "Properties not allowed: agreement.", path: "/body/package_agreements/0" }

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 32 Martin Renvoize 2023-04-19 09:39:58 UTC
All working as expected and code reads reasonably.  I think I would have liked to have seen the KohaTable flexibility improvements on their own bug as Matt had done, but I also don't want to block this one moving through, and we're early enough in the Vue/ERM side of things that I think we're OK this way.

Passing QA
Comment 33 Tomás Cohen Arazi 2023-04-19 12:22:18 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 34 Martin Renvoize 2023-05-11 16:19:26 UTC
Many hands makes light work, thankyou everyone!

Pushed to 22.11.x for the next release
Comment 35 Aude Charillon 2024-04-17 10:33:42 UTC
No need for any changes to the manual.