• Type: Sub-task
    • Resolution: Done
    • Priority: High
    • None
    • Affects Version/s: None
    • None
    • AMRIT Sprint 42, AMRIT Sprint 43
    • ECD
    • All

      1. Accept and Validate Role in Question Configuration Requests

      • Update relevant controller and DTOs to accept a new role (or category) field in the request payload during question creation or update.
      • Add validation to ensure only allowed roles are accepted (Associate, ANM, MO).
      • Ensure backward compatibility with existing ECD flows where role may be optional or missing.

      2. Persist Role in Database (MySQL)

      • Update the audit questions table schema to include a new role column (null or String).
      • Create and apply a Flyway migration script to alter the table safely.
      • Modify DAO/Repository layer to support storing and retrieving questions with the role field.

      3. Enhance m_qualityauditquestionnaire table

      • Update internal models and mappers to include the new role field.
      • Map the role field from the request body to the database entity.
      • Ensure role is saved and retrieved consistently throughout the service.

      4. Filter Questions by Role During Audit Fetch

      • Modify the audit question fetching API to accept a role parameter.
      • Implement filtering logic to return only the questions associated with the requested role/category.
      • Ensure the role is passed from the frontend and used in query conditions.

      5. Maintain Backward Compatibility for ECD

      • Preserve default behavior when the role field is absent (i.e., treat it as null).
      • Add conditional logic to serve existing ECD questions if no role is specified.
      • Manually test edge cases with missing or invalid roles to confirm existing ECD workflows are unaffected.

              Assignee:
              Amoghavarsh Desai
              Reporter:
              Amoghavarsh Desai
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 3 days, 6 hours
                  3d 6h
                  Remaining:
                  Remaining Estimate - 3 days, 6 hours
                  3d 6h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified