Skip to content

Use affiliations to define active/inactive status - #21

Merged
steve-sullivan merged 2 commits into
mainfrom
AP-418-SIS-Affiliations
Aug 3, 2026
Merged

Use affiliations to define active/inactive status#21
steve-sullivan merged 2 commits into
mainfrom
AP-418-SIS-Affiliations

Conversation

@steve-sullivan

Copy link
Copy Markdown
Contributor

Change how we definite an active student to use any affiliation with an 'active' status other than 'ALUMFOREVER'

@awilfox awilfox left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

r+ looks good to me. I did have a minor suggestion on a way to simplify the logic of sis_expire_date but it's completely optional!

Comment thread lib/helpers/application_helper.rb Outdated
Comment on lines 17 to 20
return create_expected_end_date if [5, 8, 12].include? Date.today.month
return Date.today.to_s if withcncl && withcncl == 'CAN'
return Date.today.to_s if active_student == false

create_expected_end_date

@awilfox awilfox Aug 1, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Since the same value is used twice here, I wonder if we could simplify the logic a bit:

    unless [5, 8, 12].include? Date.today.month
      return Date.today.to_s if active_student == false
    end

    create_expected_end_date

It doesn't reduce the lines of code, but it does reduce the number of return points. I don't know if it's worth making that change now, or separately, or even not at all.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Rubocop didn't like the alternative, and after going over it a bit, even though it has the reduced number of return points, I like the way the original reads a little more naturally. (and I'm lobbying to eventually change that exclusion scenario - it's a bit odd... we'd expire inactive students on April 30th and then un-expire them the following week.)

@steve-sullivan
steve-sullivan merged commit f087a03 into main Aug 3, 2026
5 checks passed
@steve-sullivan
steve-sullivan deleted the AP-418-SIS-Affiliations branch August 3, 2026 22:35
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