osmlab / to-fix-backend

The to-fix server
BSD 3-Clause "New" or "Revised" License
15 stars 13 forks source link

Allow filtering items and tags by status #163

Closed samanpwbb closed 6 years ago

samanpwbb commented 6 years ago

Should be able to pass a status option to the item list and tag list endpoints to get only tags / items with the designated status.

batpad commented 6 years ago

@samanpwbb we have filtering of items by status -- I'm not clear what the expected behaviour of "filtering tags by status" is - the intention would be to find all tags that are applied only to items of a certain status? Is this something we need immediately?

samanpwbb commented 6 years ago

the intention would be to find all tags that are applied only to items of a certain status? Is this something we need immediately?

Yes, we need to be able to list items that are just 'open' or just 'not an error' or just 'fixed' – this way to-fix can be used to both map and to review edits.

batpad commented 6 years ago

Yes, we need to be able to list items that are just 'open' or just 'not an error' or just 'fixed' – this way to-fix can be used to both map and to review edits.

Yes, this works already and I have fixed the docs for the same (you can pass like ?status=open to the get-project-items endpoint).

What I'm confused about is: tag list endpoints to get only lags / items with the designated status. - what would you mean by "get tags with the designated status" - the status is assigned to items and not tags, so fetching "tags for a designated status" is confusing to me. If it's just about fetching items for a particular status, we're good to close here.

samanpwbb commented 6 years ago

Ohhh, yeah, sorry. The request is to filter the tags list endpoint by status – we don't need to do this!

If we have item filtering by status, this issue is good to close.

batpad commented 6 years ago

Item filtering by status works, closing.