Skip to content

Conversation

syed87
Copy link
Contributor

@syed87 syed87 commented Sep 11, 2025

https://dfedigital.atlassian.net/browse/AQTS-1131

This pr reorder the list of assessors and reviewers for assignments
Screenshot 2025-09-11 at 10 36 41

@syed87 syed87 requested a review from a team as a code owner September 11, 2025 09:37
@@ -9,28 +9,52 @@
end

let(:application_form) { create :application_form, :submitted }
let(:signed_in_staff) { create(:staff, :with_assess_permission) }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be better to either have the signed in user not have assess permission so that it doesn't appear in your tests or give a name to it so you don't have to force a "sort" on your expectation.

@@ -74,7 +74,7 @@ class Staff < ApplicationRecord

validates :name, presence: true

scope :assessors, -> { where(assess_permission: true) }
scope :assessors, -> { where(assess_permission: true).order(:name) }
Copy link
Collaborator

@Hassanmir92 Hassanmir92 Sep 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this scope is not used anywhere else then I would rename this scope to be assessors_by_name so it's clear. Or if this scope is used anywhere else then to create a different scope with the name above.

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