feat:[NEXT-1926] Added Optional tags#2388
Conversation
WalkthroughThe change adds invocations to Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@installer/resources/pacbot_app/files/DB.sql`:
- Around line 3003-3004: The second CALL to
update_filter_for_tag(`@OPTIONAL_TAGS`) deletes filters inserted by the first call
because update_filter_for_tag removes existing tag options before validating
input; merge `@MANDATORY_TAGS` and `@OPTIONAL_TAGS` into a single tag list (or build
a combined variable) and call update_filter_for_tag once with that merged list,
or modify update_filter_for_tag to validate emptiness before deleting; reference
update_filter_for_tag and the variables `@MANDATORY_TAGS/`@OPTIONAL_TAGS when
making the change.
| CALL update_filter_for_tag(@MANDATORY_TAGS); | ||
| CALL update_filter_for_tag(@OPTIONAL_TAGS); |
There was a problem hiding this comment.
Second call wipes mandatory-tag filters.
update_filter_for_tag deletes existing tag options before checking for empty input, so the optional-tag call removes previously inserted mandatory-tag filters (and if optional tags are empty, it clears everything). Consider merging both tag lists and calling the procedure once.
✅ Safer single-call approach
-CALL update_filter_for_tag(`@MANDATORY_TAGS`);
-CALL update_filter_for_tag(`@OPTIONAL_TAGS`);
+CALL update_filter_for_tag(CONCAT_WS(',', `@MANDATORY_TAGS`, `@OPTIONAL_TAGS`));🤖 Prompt for AI Agents
In `@installer/resources/pacbot_app/files/DB.sql` around lines 3003 - 3004, The
second CALL to update_filter_for_tag(`@OPTIONAL_TAGS`) deletes filters inserted by
the first call because update_filter_for_tag removes existing tag options before
validating input; merge `@MANDATORY_TAGS` and `@OPTIONAL_TAGS` into a single tag
list (or build a combined variable) and call update_filter_for_tag once with
that merged list, or modify update_filter_for_tag to validate emptiness before
deleting; reference update_filter_for_tag and the variables
`@MANDATORY_TAGS/`@OPTIONAL_TAGS when making the change.
feat:NEXT-1926 Added Optional tags
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.