Skip to content

Conversation

@SteveDala
Copy link

@SteveDala SteveDala commented Jan 19, 2026

Description

This pull request is a complete rebase of the Staff Grant Extension (SGE) API functionality introduced in #77. The initial feature was built on 9.x, and this PR migrates the feature to the new 10.0.x development branch.

All credit for development of the feature API goes to @samindiii and @SahiruWithanage.

Sister branches

Run OnTrack with the latest version of these branches to recreate the environment.

Sister Pull Requests

  • thoth-tech/doubtfire-web #441: Front-end that interacts with this feature
  • doubtfire-lms/doubtfire-web #565: Upstream version

Repo cleanup

Merging this PR should be followed by closing the following open PRs with a comment that they have been merged into 10.0.x:

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

Test A

While the development container is running, connect and run rails test from the directory /workspace/doubtfire-api. This runs all unit tests. For the last successful GitHub Action run of this branch, see here.

Test B

To strictly test the API, head to localhost's API docs while your Docker server is running.

Open "auth : Operations about auths" and go to "POST /api/auth". Enter the following JSON for the postApiAuth value:

{"username": "aconvenor", "password":"password"}

Then click "Try it out!". From the response, grab the auth_token value.

Open "units : Operations about units" further down the page then go to "POST /api/units/{unit_id}/staff-grant-extension". Enter the following values for each parameter:

  • unit_id: 1
  • Username: aconvenor
  • Auth_token: (The one you received from POST /api/auth)
  • postApiUnitsUnitIdStaffGrantExtension:
{
  "student_ids": [
    24
  ],
  "task_definition_id": 1,
  "weeks_requested": 1,
  "comment": "string"
}

You should receive a "successful" result in the Response Body.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation if appropriate
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have created or extended unit tests to address my new additions
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

A complete, tested rebase of the backend work completed on the new staff
grant extension (SGE) feature.

Co-authored-by: SahiruWithanage
Co-authored-by: samindiii
@SteveDala SteveDala changed the title Feature/staff grant extension backend t1 complete feat/staff grant extension - API Rebase to 10.0.x Jan 22, 2026
@SteveDala SteveDala changed the title feat/staff grant extension - API Rebase to 10.0.x feat(SGE): API Rebase to 10.0.x Jan 22, 2026
@SteveDala SteveDala marked this pull request as ready for review January 23, 2026 12:48
@SteveDala
Copy link
Author

@BrianDangDev could you please approve the test run workflows to kick off?

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.

1 participant