Skip to content

(fix) add missing reported_brand_name field in counterfeit_reports in…#2146

Merged
dipexplorer merged 1 commit into
RatLoopz:mainfrom
arushiranjan:add-missing-field-in-counterfeit_reports
Jun 20, 2026
Merged

(fix) add missing reported_brand_name field in counterfeit_reports in…#2146
dipexplorer merged 1 commit into
RatLoopz:mainfrom
arushiranjan:add-missing-field-in-counterfeit_reports

Conversation

@arushiranjan

Copy link
Copy Markdown
Contributor

🛑 STOP: Assignment & File Scope Check

  • I am assigned to this issue.
  • I verified that this PR ONLY touches the required files.

📋 PR Summary & Link

  • Closes [Bug/Database Integrity] Missing reported_brand_name field in counterfeit_reports insertion on batch report #2098

  • Summary:
    Added the missing reported_brand_name field to the counterfeit_reports insertion payload in apps/api/src/routes/batch.ts.

    The duplicate/fuzzy-match validation logic in reportValidation.service.ts relies on reported_brand_name when identifying previously submitted reports. Batch reports created through /api/verify/batch/report were not populating this field, preventing future duplicate detection from matching those reports correctly.

    This PR stores:

    reported_brand_name: batchNumber

    alongside the existing batch report data.

📸 Proof of Work (Screenshots / Logs)

Code Change

image
  • Screenshot showing the added line:

    reported_brand_name: batchNumber,

Validation

image
  • API starts successfully using:

    npm run dev -w sahidawa-api
  • Tested /api/verify/batch/report endpoint via Swagger.

  • Local database testing is currently blocked because the configured Supabase environment returns:

    PGRST205:
    Could not find the table 'public.counterfeit_reports' in the schema cache
    

    This environment issue is unrelated to the code change introduced in this PR.

🏷️ PR Type

  • 🐛 type: bug

✅ Checklist

  • My PR has a linked issue (Closes #2098)
  • I have pulled the latest main and resolved any conflicts

…sertion on batch report

Signed-off-by: Arushi Ranjan <arushi.ranjan26@gmail.com>
@github-project-automation github-project-automation Bot moved this to 📥 Backlog in SahiDawa Workflow Jun 20, 2026
@github-actions github-actions Bot added gssoc:approved Approved for gssoc level:intermediate 35 pts status: open-for-all type:bug Something isn't working labels Jun 20, 2026
@dipexplorer dipexplorer merged commit e8c0d52 into RatLoopz:main Jun 20, 2026
15 of 16 checks passed
@github-project-automation github-project-automation Bot moved this from 📥 Backlog to 🎉 Merged in SahiDawa Workflow Jun 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Congratulations @arushiranjan! Your Pull Request "(fix) add missing reported_brand_name field in counterfeit_reports in…" has been successfully merged by @dipexplorer.

Thank you for your valuable contribution to SahiDawa! 🇮🇳
If this was for GSSoC 2026, your work is officially merged and valid. Keep up the great work and feel free to claim other open issues. 🚀

Follow us on LinkedIn: https://www.linkedin.com/company/ratloopz/ to get shoutout

@dipexplorer dipexplorer added the quality:clean multiplier x1.2 label Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Approved for gssoc level:beginner 20 pts level:intermediate 35 pts quality:clean multiplier x1.2 status: open-for-all type:bug Something isn't working

Projects

Status: 🎉 Merged

Development

Successfully merging this pull request may close these issues.

[Bug/Database Integrity] Missing reported_brand_name field in counterfeit_reports insertion on batch report

2 participants