Closed dpancic closed 1 year ago
In GitLab by @stefanprobst on May 13, 2022, 10:47
awesome! will this return contributed items which have been approved, or suggested, or both?
In GitLab by @tparkola on May 16, 2022, 08:36
The latest id is return, despite the status. You think it should be limited only to approved or ingested ones? @stefanprobst
In GitLab by @stefanprobst on May 17, 2022, 07:22
iirc the main user for this endpoint would be the "My contributed items" screen, which allows filtering contributed items by item status:
originally, this included every allowed status, but "deleted"/"deprecated" were removed, and "draft" has its own "My Draft Items" screen, so only "approved"/"ingested"/"suggested" are left.
if it is not too much work, maybe /api/contributed-items
could accept a query parameter filter by item status?
In GitLab by @tparkola on May 17, 2022, 08:45
No problem, I can corret this.
In GitLab by @tparkola on May 17, 2022, 16:17
Should steps also be delivered in this endpoint?
In GitLab by @stefanprobst on May 17, 2022, 16:20
i would say no
In GitLab by @stefanprobst on May 27, 2022, 09:46
were the item status query parameters added? not seeing them in https://sshoc-marketplace-api.acdh-dev.oeaw.ac.at/swagger-ui/index.html?url=/v3/api-docs&validatorUrl=#/default/getContributedItems
if not, no problemo, nor urgent, just wanted to check in
In GitLab by @tparkola on Jun 1, 2022, 11:48
I fixed so that only approved/ingested/suggested items will be searched and looking by item, the lates version will be shown. I can change so that selected item status only can be searched or leave list: List.of(ItemStatus.APPROVED, ItemStatus.INGESTED, ItemStatus.SUGGESTED)
In GitLab by @stefanprobst on Jun 1, 2022, 12:22
i think it depends on whether we want to keep the filter-by-status checkboxes in the UI, or if we just show a flat list on the "my contributed items" page (like we do on the "my draft items" page).
personally, i would just remove the checkboxes, and keep the endpoint as is -- and see it somebody complains.
In GitLab by @laureD19 on Jun 22, 2022, 10:08
marked this issue as related to sshoc-marketplace#102
In GitLab by @laureD19 on Jul 22, 2022, 12:15
seeing this issue just after checking mp#102
checkboxes could be removed in "my contributed items" section without problems I think, as the status of the items are anyway visible on the item list:
But what about the "items to moderate" page where both status and users are used as filters?
In GitLab by @tparkola on Jul 26, 2022, 06:53
mentioned in issue sshoc-marketplace#102
In GitLab by @tparkola on Jul 26, 2022, 07:34
Afaik "Items to moderate" use item-search endpoint (a different endpoint, not the one discussed here). So it means we can proceed in this task without checkboxes and this won't have impact on "items to moderate" page (it will stay as it is).
In GitLab by @vronk on Oct 26, 2022, 15:34
unassigned @tparkola
In GitLab by @vronk on Oct 26, 2022, 15:36
We tested this: approved a suggested item and it wasn't visible to the contributor in "My contributed Items". Do we understand correctly that the API has been adjusted, but frontend not yet to reflect the change? @stefanprobst (shall we create a frontend issue for this?
Btw, I would opt for keeping the checkboxes - so that contributor can filter their items by status.
I can confirm, that the /api/contributed-items
delivers now back the latest version of all the items that were approved/suggested/ingested. But it neither gives an option to only show such a list based on the status (e.g. show me only the items with the status approved) nor does it give the information about the status in the response value (there is only id/category/label/persistentId/lastInfoUpdate but no status).
I agree with Stefan that we could get rid of the status boxes in the "My contributed items" as the difference between "approved" and "suggested" is not really explainable and "ingested" is a very special status, which usually only few users will ever see. But to have a clue, I would prefer to add the status in the response so that it can be shown in the frontend. @tparkola Can you add the status in the respone of GET /api/contributed-items
? Then I would hand it over to frontend.
Tested it and the results do look reliable. I see for two tested accounts the contributed items where there was once an activity but in the meantime some other account performed another activity, which currently do not show up but can be seen in the new endpoint. There is also the information on the current status in the payload.
Frontend can in my opinion now use this endpoint to replace the old contributed items view with the result set coming from the endpoint GET /api/contributed-items
.
In GitLab by @tparkola on May 13, 2022, 08:33
Regarding to what we discussed in the meeting, I created an endpoint (
GET /api/contributed-items
) that returns the current list of BasicItemDtos, that user has contributed to. The changes are merged to dev. @vronk @laureD19 @KlausIllmayer @stefanprobst