Skip to content

Fix add, see edit questionnaires - #362

Open
ruju4a wants to merge 21 commits into
expertiza:mainfrom
ruju4a:feature/add_edit_see_questionnaires
Open

ruju4a wants to merge 21 commits into
expertiza:mainfrom
ruju4a:feature/add_edit_see_questionnaires

Conversation

@ruju4a

@ruju4a ruju4a commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: expertiza/reimplementation-back-end/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2649d329-ffcc-40e4-9642-aa98152e3797
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ruju4a
ruju4a force-pushed the feature/add_edit_see_questionnaires branch from 0c59d2c to ab69594 Compare September 24, 2026 16:51
@github-actions

Copy link
Copy Markdown

🚨 RSpec Tests Report

Failing Controller Test Cases:
rspec ./spec/requests/api/v1/questions_spec.rb:119 # questions /questions post created returns a 201 response
rspec ./spec/requests/api/v1/questions_spec.rb:537 # questions /questions/types get successful returns a 200 response

1 similar comment
@github-actions

Copy link
Copy Markdown

🚨 RSpec Tests Report

Failing Controller Test Cases:
rspec ./spec/requests/api/v1/questions_spec.rb:119 # questions /questions post created returns a 201 response
rspec ./spec/requests/api/v1/questions_spec.rb:537 # questions /questions/types get successful returns a 200 response

@ruju4a
ruju4a marked this pull request as ready for review September 24, 2026 16:56
@github-actions

Copy link
Copy Markdown

🚨 RSpec Tests Report

All tests passed.

efg
efg previously requested changes Oct 6, 2026
Comment thread app/controllers/questions_controller.rb Outdated
ruju4a and others added 16 commits October 6, 2026 19:47
Per reviewer feedback, the hardcoded array in QuestionsController#types
has been extracted to Item::QUESTION_TYPES constant in the Item model.
This mirrors the pattern already used by Questionnaire::QUESTIONNAIRE_TYPES,
makes the list reusable across the codebase, and keeps the controller
method clean.

- Add Item::QUESTION_TYPES constant to app/models/Item.rb
- Update QuestionsController#types to render Item::QUESTION_TYPES
- Update spec to assert against Item::QUESTION_TYPES instead of magic numbers
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… /questions routes, use txt/question_type in items_spec

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@efg
efg dismissed their stale review October 8, 2026 14:39

efg is satisfied that the issue has been resolved.

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.

2 participants