nextcloud / nextcloud/deck

Tag filter uses AND logic if several tags are selected - should use OR logic

Open
#2,149 12 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

1. to develop enhancement feature: filter feature: tags
Dominant language
JavaScript
Stars
1.4k
Forks
354
Avg merge
1d 10h
Merged PRs (30d)
43

Description

Describe the bug
When filtering cards for tags and selecting several tags, only cards having all selected tags are shown (condition: card must have tagA AND tagB).

To Reproduce
Steps to reproduce the behavior:

  1. have a board with at least 2 tags, tagA and tagB
  2. assign tagA to one card
  3. assing tagB to another card
  4. assign both tagA and tagB to a third card
  5. use the filter and select both tagA and tagB
  6. notice that only the third card is shown

Expected behavior
I would expect to see all cards that have one of the selected tags (condition: card must have tagA OR tagB).
Of course, you could argue which of the two possibilities is the "correct" way to go - for me the current AND condition is of no use at all, while I could use OR conditions.

So I'm not sure if this is a bug report or a feature request - that depends on your original intentions while implementing that bit ;-)

If others have use cases for AND conditions, maybe the best way to go would be an option to chose which behaviour should be used?

Side note
The Nextcloud Deck app for Android is using OR conditions when selecting several tags in the filter, which feels (to me) like the natural behaviour.

Nextcloud version:
Nextcloud 19.0
Deck 1.0.5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the tag-filter behavior with separate cards carrying tagA, tagB, and both tags, then locate the Deck entry point that applies multiple selected tags. The change is done when selecting tagA and tagB shows cards containing either tag, while the existing reproduction scenario and relevant filter behavior are covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.