Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions installer/resources/pacbot_app/files/DB.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3001,6 +3001,7 @@ END $$
DELIMITER ;

CALL update_filter_for_tag(@MANDATORY_TAGS);
CALL update_filter_for_tag(@OPTIONAL_TAGS);
Comment on lines 3003 to +3004

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

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.



/* Updating resourceName for Azure target Type */
Expand Down
Loading