View Issue Details

IDProjectCategoryView StatusLast Update
0009038Talermechant backendpublic2024-08-07 18:04
Reportersebasjm Assigned To 
PriorityhighSeverityfeatureReproducibilityalways
Status confirmedResolutionopen 
Product Version0.13 
Target Versionpost-1.0 
Summary0009038: fix category CRUD api
Descriptiongetting category by ID doesn't bring the list of products correctly
the implementation doesn't include product description, it should by the API docs

updating should also be tested
TagsNo tags attached.

Activities

Christian Grothoff

2024-08-04 22:33

manager   ~0022908

I've fixed the select_category implementation (in C), and simplified the spec to NOT return description/description_i18n -- if the SPA needs those, it can fetch them individually from the product_id anyway.

Re-assigning to sebasjm for testing with the SPA...

sebasjm

2024-08-07 17:33

developer   ~0022942

curl 'http://merchant.taler.test:1180/private/categories/15' -X 'PATCH' --data-raw '{"name":"barato","name_i18n":{},"products":[{"product_id":"beer"}],"id":"15"}'

can't change the lists of products of the category

sebasjm

2024-08-07 17:34

developer   ~0022943

i suggest to mark it for post-1.0

we can add/remove categories from the product and in this screen (updating the category) I can limit to showing instead of editing

Christian Grothoff

2024-08-07 18:04

manager   ~0022946

I'm not sure what you are talking about. Is it that when the user views a category, they cannot edit the products there? That's kind-of intentional, they should select the product and change the category with the product.

I guess it might be useful to be able to do such a change in both views (and with the category view add/remove products to the category), but indeed the API wasn't designed to support that (not with that PATCH on category).

The SPA _could_, however, simply use the PATCH on the *product(s)* to add/remove a product from a category. So this is IMO a client-side thing -- the SPA should just use a different endpoint (and possibly might have to first to a GET on the product and then a PATCH).

Anyway, if I understand correctly, I'd be happy to see this as a post-1.0 feature...

Issue History

Date Modified Username Field Change
2024-08-02 16:13 sebasjm New Issue
2024-08-02 16:13 sebasjm Status new => assigned
2024-08-02 16:13 sebasjm Assigned To => sebasjm
2024-08-04 22:15 Christian Grothoff Assigned To sebasjm => Christian Grothoff
2024-08-04 22:33 Christian Grothoff Note Added: 0022908
2024-08-04 22:33 Christian Grothoff Assigned To Christian Grothoff => sebasjm
2024-08-07 17:33 sebasjm Note Added: 0022942
2024-08-07 17:33 sebasjm Assigned To sebasjm => Christian Grothoff
2024-08-07 17:34 sebasjm Status assigned => confirmed
2024-08-07 17:34 sebasjm Note Added: 0022943
2024-08-07 18:04 Christian Grothoff Note Added: 0022946
2024-08-07 18:04 Christian Grothoff Assigned To Christian Grothoff =>
2024-08-07 18:04 Christian Grothoff Severity major => feature
2024-08-07 18:04 Christian Grothoff Target Version 0.13 => post-1.0