Skip to content

Exclude blank answers from frequency lists#442

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/exclude-blank-answers-frequency
Draft

Exclude blank answers from frequency lists#442
Copilot wants to merge 2 commits intomainfrom
copilot/exclude-blank-answers-frequency

Conversation

Copy link
Contributor

Copilot AI commented Feb 19, 2026

The frequency list aggregation pipeline filters out null values but allows empty strings through, resulting in blank entries in the frequency tables.

Changes

  • Updated the MongoDB aggregation filter in get-frequency-list.js to exclude both null and empty string values using $nin operator
// Before
{ $match: { _id: { $ne: null } } }

// After  
{ $match: { _id: { $nin: [null, ''] } } }

After the pipeline extracts answers via regex and trims whitespace, some answers become empty strings. These now get filtered out along with null values.

Original prompt

This section details on the original issue you should resolve

<issue_title>Exclude blank answers from frequency lists</issue_title>
<issue_description></issue_description>

<agent_instructions>do not write any tests, the user will test this manually</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: geoffrey-wu <42471355+geoffrey-wu@users.noreply.github.com>
Copilot AI changed the title [WIP] Exclude blank answers from frequency lists Exclude blank answers from frequency lists Feb 19, 2026
Copilot AI requested a review from geoffrey-wu February 19, 2026 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exclude blank answers from frequency lists

2 participants

Comments