mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
Follows the card-number operator. #5006's title says "number/#", and the form people actually type is the one on the card: #12, or just 12 in the search box. Both now search for BOTH - a label called 12, and the card whose number is 12. Which of the two somebody means cannot be read off the text: a board calls a card "#12", and a label can be called anything, including "12". Answering with both is the only reading that never hides what they were looking for. The two halves are joined with OR, and that is the property that makes this safe rather than destructive. A search that used to find a label called "2024" still finds it; the card numbered 2024 is added to the answer instead of replacing it. An AND would have found nothing at all in almost every case and would have looked like the feature working. Only a term that is entirely digits gets the second half, so #red is the label red exactly as before, and a label-only search takes the code path it always took. A bare 12 adds the card number as one more alternative in the $or that already holds title, description, custom fields, checklists, attachments and comments - so nothing that matched before stops matching. #12 on a board with no label called 12 no longer reports "label not found": the card-number half is a real answer, and a not-found message beside the card it just found contradicts the screen. The guard that pinned the opposite decision moved rather than being deleted. It now pins the union, the OR, that only numbers get it, that #red is untouched, and that the not-found error still fires for a word. Thanks to mfilser and xet7 !