SSHOC / sshoc-marketplace-backend

Code for the backend
Apache License 2.0
2 stars 0 forks source link

Looking for a sourceItemId delivers wrong result #140

Closed dpancic closed 1 year ago

dpancic commented 2 years ago

In GitLab by @KlausIllmayer on Jan 11, 2022, 17:09

On stage there is strange behaviour when calling /api/sources/4/items/SSK_sc_DTABf. It should return no item as we don't have an active, approved item from source 4 (= SSK scenarios) with the sourceItemId "SSK_sc_DTABf". Instead the call /api/sources/4/items/SSK_sc_DTABf returns as item XQspOg which has as sourceItemId SSK_sc_statisticalAnalysisOccupations (look at the call /api/workflows/XQspOg). Looking into the database the workflow with the persistent_id XQspOg had once the sourceItemId SSK_sc_DTABf (which is now status DEPRECATED) but then switched to SSK_sc_statisticalAnalysisOccupations. So it looks like that the call /api/sources/4/items/SSK_sc_DTABf does not find at first an active item and instead takes a deprecated one - could that be?

Including @vronk and @laureD19 into the issue

dpancic commented 2 years ago

In GitLab by @tparkola on Jan 17, 2022, 15:41

@KlausIllmayer Actually, it took approved items, unfortunately it searched through the item history. If given item had source in the past, but changed in the meantime, then it was shown. I created to merge request that fix this issue - search only in the current version of the item.

dpancic commented 2 years ago

In GitLab by @tparkola on Jan 18, 2022, 11:17

changed the status to Resolved by closing the incident