Bug 33105 - Add vendor issues
Summary: Add vendor issues
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low new feature (vote)
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 33104
Blocks: 34255 35634
  Show dependency treegraph
 
Reported: 2023-03-01 10:01 UTC by Jonathan Druart
Modified: 2023-12-21 19:29 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact: Caroline Cyr La Rose
Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/750
Text to go in the release notes:
For vendors who, in particular, provide electronic services (e.g. eJournal providers) it is useful to be able to record service issues. This new feature allows for recording such details, for example logging login problems, service interruptions and incorrect availability. This is important as evidence when submitting contract negotiations and judging vendor performance against existing contracts. **Sponsored by** *Bywater Solutions* and *PTFS Europe Ltd*
Version(s) released in:
23.11.00


Attachments
Bug 33105: DB changes (6.34 KB, patch)
2023-04-12 09:20 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33105: DBIC schema changes (3.95 KB, patch)
2023-04-12 09:20 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33105: DBIC specific (1003 bytes, patch)
2023-04-12 09:20 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33105: Add Koha object classes (4.58 KB, patch)
2023-04-12 09:20 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33105: Add vendor issues (19.59 KB, patch)
2023-04-12 09:20 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33105: REST API specs (5.55 KB, patch)
2023-04-12 09:21 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33105: Add tests (6.58 KB, patch)
2023-04-12 09:21 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33105: Add vendor issues (19.59 KB, patch)
2023-04-12 11:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33105: REST API specs (5.55 KB, patch)
2023-04-12 11:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33105: Add tests (6.58 KB, patch)
2023-04-12 11:56 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33105: DB changes (6.39 KB, patch)
2023-04-12 15:12 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 33105: DBIC schema changes (4.00 KB, patch)
2023-04-12 15:12 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 33105: DBIC specific (1.04 KB, patch)
2023-04-12 15:12 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 33105: Add Koha object classes (4.63 KB, patch)
2023-04-12 15:12 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 33105: Add vendor issues (19.64 KB, patch)
2023-04-12 15:12 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 33105: REST API specs (5.61 KB, patch)
2023-04-12 15:12 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 33105: Add tests (6.64 KB, patch)
2023-04-12 15:12 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 33105: DB changes (6.42 KB, patch)
2023-06-30 10:00 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: Add Koha object classes (4.67 KB, patch)
2023-06-30 10:00 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: Add vendor issues (19.68 KB, patch)
2023-06-30 10:00 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: REST API specs (5.65 KB, patch)
2023-06-30 10:00 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: Add tests (6.68 KB, patch)
2023-06-30 10:00 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: [DBIx] Schema changes (4.02 KB, patch)
2023-06-30 10:00 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: DBIC specific (1.08 KB, patch)
2023-06-30 10:00 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: (QA follow-up) Small changes in dbrev (1.66 KB, patch)
2023-07-07 07:02 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: (QA follow-up) Changes for Koha objects (2.18 KB, patch)
2023-07-07 07:02 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: (QA follow-up) REST API (1.78 KB, patch)
2023-07-07 07:03 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: Fix vendor api spec (1.15 KB, patch)
2023-07-07 08:04 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33105: Redirect to 404 if no vendor exists (808 bytes, patch)
2023-07-07 08:04 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33105: Redirect to 404 if no vendor exists (1.85 KB, patch)
2023-07-07 08:45 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33105: DB changes (6.48 KB, patch)
2023-07-07 09:15 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: Add Koha object classes (4.73 KB, patch)
2023-07-07 09:15 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: Add vendor issues (19.74 KB, patch)
2023-07-07 09:15 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: REST API specs (5.70 KB, patch)
2023-07-07 09:15 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: Add tests (6.73 KB, patch)
2023-07-07 09:15 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: [DBIx] Schema changes (4.08 KB, patch)
2023-07-07 09:15 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: DBIC specific (1.14 KB, patch)
2023-07-07 09:15 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: (QA follow-up) Small changes in dbrev (2.66 KB, patch)
2023-07-07 09:15 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: (QA follow-up) Changes for Koha objects (2.23 KB, patch)
2023-07-07 09:15 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: (QA follow-up) REST API (1.84 KB, patch)
2023-07-07 09:15 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: Fix vendor api spec (1.25 KB, patch)
2023-07-07 09:15 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: Redirect to 404 if no vendor exists (1.94 KB, patch)
2023-07-07 09:15 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 33105: (follow-up) DB changes (1.25 KB, patch)
2023-07-20 15:38 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 33105: Fix Auth/Permissions.t (1.03 KB, patch)
2023-07-20 15:38 UTC, Jonathan Druart
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-03-01 10:01:02 UTC
The benefit of recording vendor issues is that you can identify problems you have had with the service and use this as a negotiating tool with vendors at contract renegotiation.
Comment 1 Jonathan Druart 2023-04-12 09:20:46 UTC
Created attachment 149509 [details] [review]
Bug 33105: DB changes
Comment 2 Jonathan Druart 2023-04-12 09:20:50 UTC
Created attachment 149510 [details] [review]
Bug 33105: DBIC schema changes
Comment 3 Jonathan Druart 2023-04-12 09:20:52 UTC
Created attachment 149511 [details] [review]
Bug 33105: DBIC specific
Comment 4 Jonathan Druart 2023-04-12 09:20:55 UTC
Created attachment 149512 [details] [review]
Bug 33105: Add Koha object classes
Comment 5 Jonathan Druart 2023-04-12 09:20:58 UTC
Created attachment 149513 [details] [review]
Bug 33105: Add vendor issues

This patch is the main patch of this patch set, it contains the
controller acqui/vendor_issues.pl, its corresponding template, and some
links to this script.

It adds:
* A new DB table aqbookseller_issues linked with the aqbooksellers table
* A new subpermission acquisition.issue_manage
* A new authorised value category VENDOR_ISSUE_TYPE and two examples
MAINTENANCE and OUTAGE
* A new controller couple acqui/vendor_issues.[pl,tt]

Test plan:
0. Apply the patches, run updatedatabase and restart_all
1. Go to the acquisition module, create a new vendor or use an existing
one
2. Create a couple of issues for this vendor
3. Edit/Delete and search for those issues

This is the basics for tracking issues with vendors.
Suggestions welcome, on follow-up bug reports.
Comment 6 Jonathan Druart 2023-04-12 09:21:01 UTC
Created attachment 149514 [details] [review]
Bug 33105: REST API specs
Comment 7 Jonathan Druart 2023-04-12 09:21:03 UTC
Created attachment 149515 [details] [review]
Bug 33105: Add tests
Comment 8 Jonathan Field 2023-04-12 11:27:56 UTC
Deletion is currently failing due to a typo in vendor_issues.pl

cgi-bin/koha/acqui/vendor_iddues.pl?op=delete_confirm&issue_id=1

iddues instead of issues. Looking good otherwise!
Comment 9 Jonathan Druart 2023-04-12 11:56:48 UTC
Created attachment 149530 [details] [review]
Bug 33105: Add vendor issues

This patch is the main patch of this patch set, it contains the
controller acqui/vendor_issues.pl, its corresponding template, and some
links to this script.

It adds:
* A new DB table aqbookseller_issues linked with the aqbooksellers table
* A new subpermission acquisition.issue_manage
* A new authorised value category VENDOR_ISSUE_TYPE and two examples
MAINTENANCE and OUTAGE
* A new controller couple acqui/vendor_issues.[pl,tt]

Test plan:
0. Apply the patches, run updatedatabase and restart_all
1. Go to the acquisition module, create a new vendor or use an existing
one
2. Create a couple of issues for this vendor
3. Edit/Delete and search for those issues

This is the basics for tracking issues with vendors.
Suggestions welcome, on follow-up bug reports.
Comment 10 Jonathan Druart 2023-04-12 11:56:51 UTC
Created attachment 149531 [details] [review]
Bug 33105: REST API specs
Comment 11 Jonathan Druart 2023-04-12 11:56:54 UTC
Created attachment 149532 [details] [review]
Bug 33105: Add tests
Comment 12 Jonathan Druart 2023-04-12 11:58:30 UTC
(In reply to Jonathan Field from comment #8)
> Deletion is currently failing due to a typo in vendor_issues.pl

oops, should be fixed now!
Comment 13 PTFS Europe Sandboxes 2023-04-12 15:12:02 UTC
Created attachment 149556 [details] [review]
Bug 33105: DB changes

Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com>
Comment 14 PTFS Europe Sandboxes 2023-04-12 15:12:05 UTC
Created attachment 149557 [details] [review]
Bug 33105: DBIC schema changes

Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com>
Comment 15 PTFS Europe Sandboxes 2023-04-12 15:12:07 UTC
Created attachment 149558 [details] [review]
Bug 33105: DBIC specific

Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com>
Comment 16 PTFS Europe Sandboxes 2023-04-12 15:12:09 UTC
Created attachment 149559 [details] [review]
Bug 33105: Add Koha object classes

Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com>
Comment 17 PTFS Europe Sandboxes 2023-04-12 15:12:12 UTC
Created attachment 149560 [details] [review]
Bug 33105: Add vendor issues

This patch is the main patch of this patch set, it contains the
controller acqui/vendor_issues.pl, its corresponding template, and some
links to this script.

It adds:
* A new DB table aqbookseller_issues linked with the aqbooksellers table
* A new subpermission acquisition.issue_manage
* A new authorised value category VENDOR_ISSUE_TYPE and two examples
MAINTENANCE and OUTAGE
* A new controller couple acqui/vendor_issues.[pl,tt]

Test plan:
0. Apply the patches, run updatedatabase and restart_all
1. Go to the acquisition module, create a new vendor or use an existing
one
2. Create a couple of issues for this vendor
3. Edit/Delete and search for those issues

This is the basics for tracking issues with vendors.
Suggestions welcome, on follow-up bug reports.

Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com>
Comment 18 PTFS Europe Sandboxes 2023-04-12 15:12:14 UTC
Created attachment 149561 [details] [review]
Bug 33105: REST API specs

Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com>
Comment 19 PTFS Europe Sandboxes 2023-04-12 15:12:16 UTC
Created attachment 149562 [details] [review]
Bug 33105: Add tests

Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com>
Comment 20 Marcel de Rooy 2023-06-30 10:00:30 UTC
Created attachment 152894 [details] [review]
Bug 33105: DB changes

Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com>
Comment 21 Marcel de Rooy 2023-06-30 10:00:33 UTC
Created attachment 152895 [details] [review]
Bug 33105: Add Koha object classes

Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com>
Comment 22 Marcel de Rooy 2023-06-30 10:00:36 UTC
Created attachment 152896 [details] [review]
Bug 33105: Add vendor issues

This patch is the main patch of this patch set, it contains the
controller acqui/vendor_issues.pl, its corresponding template, and some
links to this script.

It adds:
* A new DB table aqbookseller_issues linked with the aqbooksellers table
* A new subpermission acquisition.issue_manage
* A new authorised value category VENDOR_ISSUE_TYPE and two examples
MAINTENANCE and OUTAGE
* A new controller couple acqui/vendor_issues.[pl,tt]

Test plan:
0. Apply the patches, run updatedatabase and restart_all
1. Go to the acquisition module, create a new vendor or use an existing
one
2. Create a couple of issues for this vendor
3. Edit/Delete and search for those issues

This is the basics for tracking issues with vendors.
Suggestions welcome, on follow-up bug reports.

Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com>
Comment 23 Marcel de Rooy 2023-06-30 10:00:38 UTC
Created attachment 152897 [details] [review]
Bug 33105: REST API specs

Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com>
Comment 24 Marcel de Rooy 2023-06-30 10:00:41 UTC
Created attachment 152898 [details] [review]
Bug 33105: Add tests

Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com>
Comment 25 Marcel de Rooy 2023-06-30 10:00:44 UTC
Created attachment 152899 [details] [review]
Bug 33105: [DBIx] Schema changes

Former patches did not apply anymore. Refreshed them.
Comment 26 Marcel de Rooy 2023-06-30 10:00:46 UTC
Created attachment 152900 [details] [review]
Bug 33105: DBIC specific

Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com>
Comment 27 Marcel de Rooy 2023-06-30 10:01:19 UTC
Not able to finish now. Rebased/refreshed dbix stuff.
Comment 28 Marcel de Rooy 2023-07-07 06:21:23 UTC
(In reply to Marcel de Rooy from comment #27)
> Not able to finish now. Rebased/refreshed dbix stuff.

Continuing here
Comment 29 Marcel de Rooy 2023-07-07 07:00:18 UTC
acqui/vendor_issues.pl demonstrates a point that is larger than this script:
$issue = Koha::Acquisition::Bookseller::Issues->find($issue_id);
We have a name clash with the issues table, so it would have been nicer to specify vendor_issue here in naming variables.
No blocker just noting.
Comment 30 Marcel de Rooy 2023-07-07 07:00:37 UTC
  vendor_id:
    type:
      - string
  started_on:
    type:
      - string
  ended_on:
    type:
      - string

Was expecting a numeric id and dates ?
Comment 31 Marcel de Rooy 2023-07-07 07:01:12 UTC
Plural or singular? Confusion !

+  vendor_issue:
+    $ref: ./definitions/vendor_issue.yaml
+  "/acquisitions/vendors/{vendor_id}/issues":
+    $ref: "./paths/acquisitions_vendor_issues.yaml#/~1acquisitions~1vendors~1{vendor_id}~1issues"

Wny vendor and acquisition_vendor btw ?
Comment 32 Marcel de Rooy 2023-07-07 07:01:24 UTC
TODO kohastructure
Comment 33 Marcel de Rooy 2023-07-07 07:02:04 UTC
Can't call method "issues" on an undefined value at /usr/share/koha/acqui/vendor_issues.pl line 103.  at /usr/share/koha/acqui/vendor_issues.pl line 102
When there is no vendor. Tried to use output_and_exit. But it needs more attention.
Comment 34 Marcel de Rooy 2023-07-07 07:02:56 UTC
Created attachment 153117 [details] [review]
Bug 33105: (QA follow-up) Small changes in dbrev
Comment 35 Marcel de Rooy 2023-07-07 07:02:58 UTC
Created attachment 153118 [details] [review]
Bug 33105: (QA follow-up) Changes for Koha objects
Comment 36 Marcel de Rooy 2023-07-07 07:03:00 UTC
Created attachment 153119 [details] [review]
Bug 33105: (QA follow-up) REST API

Includes removing q_header.
Inconsistent use of quotes for response codes.
Comment 37 Marcel de Rooy 2023-07-07 07:03:56 UTC
This is not ready yet. Wonder why this got signed off?
Comment 38 Jonathan Druart 2023-07-07 08:04:44 UTC
Created attachment 153122 [details] [review]
Bug 33105: Fix vendor api spec

vendor ID must be integer and date attributes should specify the format
accordingly.
Comment 39 Jonathan Druart 2023-07-07 08:04:47 UTC
Created attachment 153123 [details] [review]
Bug 33105: Redirect to 404 if no vendor exists
Comment 40 Jonathan Druart 2023-07-07 08:05:04 UTC
(In reply to Marcel de Rooy from comment #29)
> acqui/vendor_issues.pl demonstrates a point that is larger than this script:
> $issue = Koha::Acquisition::Bookseller::Issues->find($issue_id);
> We have a name clash with the issues table, so it would have been nicer to
> specify vendor_issue here in naming variables.
> No blocker just noting.

well, 'issue' in the code should be checkout when it's about checkouts. If you see $vendor->issue you know given the context that it's about vendor's issues, not checkout.
I can rename if you want but I don't think it's needed.

(In reply to Marcel de Rooy from comment #30)
>   vendor_id:
>     type:
>       - string
>   started_on:
>     type:
>       - string
>   ended_on:
>     type:
>       - string
> 
> Was expecting a numeric id and dates ?

vendor_id must be integer, yes.
dates have a type=string. Could have a format=date however, I totally overlooked that.
Done in commit "Fix vendor api spec"

(In reply to Marcel de Rooy from comment #31)
> Plural or singular? Confusion !

Where? vendor_issue.yaml is the definition file for a given issue, hence the singular.
acquisitions_vendor_issues.yaml is the path for the /issues endpoint. It's following the convention.

> +  vendor_issue:
> +    $ref: ./definitions/vendor_issue.yaml
> +  "/acquisitions/vendors/{vendor_id}/issues":
> +    $ref:
> "./paths/acquisitions_vendor_issues.yaml#/
> ~1acquisitions~1vendors~1{vendor_id}~1issues"
> 
> Wny vendor and acquisition_vendor btw ?

"acquisitions_vendor_issues" to copy "acquisitions_orders.yaml" and keep consistency. Same for the definition file: vendor.yaml vendor_alias.yaml vendor_issue.yaml order.yaml
We could/should all prefixed them with 'acquisitions', but that's not for this bug.

(In reply to Marcel de Rooy from comment #32)
> TODO kohastructure

What's missing there?

(In reply to Marcel de Rooy from comment #33)
> Can't call method "issues" on an undefined value at
> /usr/share/koha/acqui/vendor_issues.pl line 103.  at
> /usr/share/koha/acqui/vendor_issues.pl line 102
> When there is no vendor. Tried to use output_and_exit. But it needs more
> attention.

Done in "Redirect to 404 if no vendor exists"

(In reply to Marcel de Rooy from comment #37)
> This is not ready yet. Wonder why this got signed off?

Because it was working according to the test plan? :)

Thanks for the follow-ups, they all make sense!
Comment 41 Marcel de Rooy 2023-07-07 08:20:19 UTC
Revisiting
Comment 42 Marcel de Rooy 2023-07-07 08:33:35 UTC
> (In reply to Marcel de Rooy from comment #37)
> > This is not ready yet. Wonder why this got signed off?
> 
> Because it was working according to the test plan? :)

Hmm. A test plan can be incomplete.
Here is another problem:
Add an issue. Delete it. Say no. Response is 404. That is not good.
Comment 43 Jonathan Druart 2023-07-07 08:45:12 UTC
Created attachment 153125 [details] [review]
Bug 33105: Redirect to 404 if no vendor exists
Comment 44 Marcel de Rooy 2023-07-07 08:54:53 UTC
(In reply to Jonathan Druart from comment #40)
> (In reply to Marcel de Rooy from comment #32)
> > TODO kohastructure
> 
> What's missing there?
> 

Nothing. Now I remember that I was searching for vendor_issues in it. And it should be aqbookseller_issues, so nice ;)
Comment 45 Marcel de Rooy 2023-07-07 09:06:13 UTC Comment hidden (obsolete)
Comment 46 Marcel de Rooy 2023-07-07 09:09:16 UTC Comment hidden (obsolete)
Comment 47 Marcel de Rooy 2023-07-07 09:15:19 UTC
Created attachment 153126 [details] [review]
Bug 33105: DB changes

Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 48 Marcel de Rooy 2023-07-07 09:15:21 UTC
Created attachment 153127 [details] [review]
Bug 33105: Add Koha object classes

Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 49 Marcel de Rooy 2023-07-07 09:15:24 UTC
Created attachment 153128 [details] [review]
Bug 33105: Add vendor issues

This patch is the main patch of this patch set, it contains the
controller acqui/vendor_issues.pl, its corresponding template, and some
links to this script.

It adds:
* A new DB table aqbookseller_issues linked with the aqbooksellers table
* A new subpermission acquisition.issue_manage
* A new authorised value category VENDOR_ISSUE_TYPE and two examples
MAINTENANCE and OUTAGE
* A new controller couple acqui/vendor_issues.[pl,tt]

Test plan:
0. Apply the patches, run updatedatabase and restart_all
1. Go to the acquisition module, create a new vendor or use an existing
one
2. Create a couple of issues for this vendor
3. Edit/Delete and search for those issues

This is the basics for tracking issues with vendors.
Suggestions welcome, on follow-up bug reports.

Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 50 Marcel de Rooy 2023-07-07 09:15:27 UTC
Created attachment 153129 [details] [review]
Bug 33105: REST API specs

Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 51 Marcel de Rooy 2023-07-07 09:15:29 UTC
Created attachment 153130 [details] [review]
Bug 33105: Add tests

Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 52 Marcel de Rooy 2023-07-07 09:15:32 UTC
Created attachment 153131 [details] [review]
Bug 33105: [DBIx] Schema changes

Former patches did not apply anymore. Refreshed them.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 53 Marcel de Rooy 2023-07-07 09:15:35 UTC
Created attachment 153132 [details] [review]
Bug 33105: DBIC specific

Signed-off-by: Jonathan Field <jonathan.fieeld@ptfs-europe.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 54 Marcel de Rooy 2023-07-07 09:15:37 UTC
Created attachment 153133 [details] [review]
Bug 33105: (QA follow-up) Small changes in dbrev

Similar edit in kohastructure added.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 55 Marcel de Rooy 2023-07-07 09:15:40 UTC
Created attachment 153134 [details] [review]
Bug 33105: (QA follow-up) Changes for Koha objects

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 56 Marcel de Rooy 2023-07-07 09:15:42 UTC
Created attachment 153135 [details] [review]
Bug 33105: (QA follow-up) REST API

Includes removing q_header.
Inconsistent use of quotes for response codes.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 57 Marcel de Rooy 2023-07-07 09:15:45 UTC
Created attachment 153136 [details] [review]
Bug 33105: Fix vendor api spec

vendor ID must be integer and date attributes should specify the format
accordingly.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 58 Marcel de Rooy 2023-07-07 09:15:48 UTC
Created attachment 153137 [details] [review]
Bug 33105: Redirect to 404 if no vendor exists

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 59 Tomás Cohen Arazi 2023-07-11 12:33:15 UTC
Not going to block this, but we added the 'OPAC concerns' and now the 'vendor issues'. Should we think of a more generic approach?
Comment 60 Jonathan Druart 2023-07-11 12:56:20 UTC
(In reply to Tomás Cohen Arazi from comment #59)
> Not going to block this, but we added the 'OPAC concerns' and now the
> 'vendor issues'. Should we think of a more generic approach?

Hum I don't think so, they are two completely different things. One is linked with the acquisition module for external entities, OPAC concerns is for OPAC users. I don't see how we could merge them.
Comment 61 Tomás Cohen Arazi 2023-07-11 13:09:45 UTC
(In reply to Jonathan Druart from comment #60)
> (In reply to Tomás Cohen Arazi from comment #59)
> > Not going to block this, but we added the 'OPAC concerns' and now the
> > 'vendor issues'. Should we think of a more generic approach?
> 
> Hum I don't think so, they are two completely different things. One is
> linked with the acquisition module for external entities, OPAC concerns is
> for OPAC users. I don't see how we could merge them.

Besides the UI differences, I see 'ticket type X' and 'ticket type Y'. I had the same concerns about the 'OPAC record concerns ' feature as being too specific by design.
Comment 62 Jonathan Druart 2023-07-11 13:19:35 UTC
(In reply to Tomás Cohen Arazi from comment #61)
> (In reply to Jonathan Druart from comment #60)
> > (In reply to Tomás Cohen Arazi from comment #59)
> > > Not going to block this, but we added the 'OPAC concerns' and now the
> > > 'vendor issues'. Should we think of a more generic approach?
> > 
> > Hum I don't think so, they are two completely different things. One is
> > linked with the acquisition module for external entities, OPAC concerns is
> > for OPAC users. I don't see how we could merge them.
> 
> Besides the UI differences, I see 'ticket type X' and 'ticket type Y'. I had
> the same concerns about the 'OPAC record concerns ' feature as being too
> specific by design.

The table name was not specific: "tickets" :D
Comment 63 Tomás Cohen Arazi 2023-07-11 15:42:50 UTC
(In reply to Jonathan Druart from comment #62)
> (In reply to Tomás Cohen Arazi from comment #61)
> > (In reply to Jonathan Druart from comment #60)
> > > (In reply to Tomás Cohen Arazi from comment #59)
> > > > Not going to block this, but we added the 'OPAC concerns' and now the
> > > > 'vendor issues'. Should we think of a more generic approach?
> > > 
> > > Hum I don't think so, they are two completely different things. One is
> > > linked with the acquisition module for external entities, OPAC concerns is
> > > for OPAC users. I don't see how we could merge them.
> > 
> > Besides the UI differences, I see 'ticket type X' and 'ticket type Y'. I had
> > the same concerns about the 'OPAC record concerns ' feature as being too
> > specific by design.
> 
> The table name was not specific: "tickets" :D

The table name got the right name, that's true. But we have 

concerns.pl
concerns.tt

and all the tools are named 'catalog_concern.*'. Including the admin pages.

Not complaining, just saying that we might need to think of a more general approach at some point.
Comment 64 Martin Renvoize 2023-07-11 16:09:59 UTC
I think I left follow-up bugs to generalise that.. I was heading towards a more generalised enquiry management flow but I had to also keep the sponsor happy.. hense the API design trying hard to generalise and then my aim was to migrate to vue and a new 'enquiries' module once some of the vue stuff had settled (at the time I coded catalogue concerns, we'd not made anywhere near the progress in vue).

I'd love to see a much more generalise enquiries/workflows entity and am happy to contribute in that space.. we're currently working on sponsorship for it here at ptfs-e.
Comment 65 Marcel de Rooy 2023-07-12 06:02:44 UTC
(In reply to Jonathan Druart from comment #60)
> (In reply to Tomás Cohen Arazi from comment #59)
> > Not going to block this, but we added the 'OPAC concerns' and now the
> > 'vendor issues'. Should we think of a more generic approach?
> 
> Hum I don't think so, they are two completely different things. One is
> linked with the acquisition module for external entities, OPAC concerns is
> for OPAC users. I don't see how we could merge them.

A generic approach would only make sense tome if the workflow around such concerns and issues is kind of the same.

The fact that we have e.g. lists and patron lists does not mean that they should be merged in one table. Etc.
Comment 66 Katrin Fischer 2023-07-12 09:08:59 UTC
I feel like the 'OPAC problems' and 'Catalog concerns' are a closer match than the vendor issues. 

At the moment the vendor issues are not about communicating problems, but about tracking them, while the other two features are both about reporting something to the library with the ability to reply/resolve. I think it would make sense merging them first and leave this be.
Comment 67 Tomás Cohen Arazi 2023-07-20 14:00:59 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 68 Jonathan Druart 2023-07-20 15:38:34 UTC
Created attachment 153730 [details] [review]
Bug 33105: (follow-up) DB changes

boooh!

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 69 Jonathan Druart 2023-07-20 15:38:37 UTC
Created attachment 153731 [details] [review]
Bug 33105: Fix Auth/Permissions.t
Comment 70 Jonathan Druart 2023-07-20 15:38:50 UTC
(In reply to Jonathan Druart from comment #68)
> Created attachment 153730 [details] [review] [review]
> Bug 33105: (follow-up) DB changes
> 
> boooh!
> 
> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

This has been pushed.
Comment 71 Jonathan Druart 2023-07-20 15:39:28 UTC
(In reply to Jonathan Druart from comment #69)
> Created attachment 153731 [details] [review] [review]
> Bug 33105: Fix Auth/Permissions.t

Still need to be pushed.

I am not sure those tests are really useful...
Comment 72 Tomás Cohen Arazi 2023-07-24 17:13:25 UTC
(In reply to Jonathan Druart from comment #71)
> (In reply to Jonathan Druart from comment #69)
> > Created attachment 153731 [details] [review] [review] [review]
> > Bug 33105: Fix Auth/Permissions.t
> 
> Still need to be pushed.
> 
> I am not sure those tests are really useful...

Pushed, thanks.
Comment 73 Fridolin Somers 2023-08-04 01:49:26 UTC
New feature not pushed to 23.05.x