Skip to content

fix: make active and retired fields clearer (SubsidyAccessPolicy)#214

Merged
pwnage101 merged 1 commit into
mainfrom
pwnage101/fix-policy-retired-helptext
Jun 24, 2026
Merged

fix: make active and retired fields clearer (SubsidyAccessPolicy)#214
pwnage101 merged 1 commit into
mainfrom
pwnage101/fix-policy-retired-helptext

Conversation

@pwnage101

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 24, 2026 17:49
@pwnage101 pwnage101 requested review from a team as code owners June 24, 2026 17:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the admin-facing help_text for the SubsidyAccessPolicy.retired flag to correct the described boolean polarity and keep the schema’s field metadata in sync via a migration.

Changes:

  • Updates SubsidyAccessPolicy.retired help text to reflect the intended meaning of the retired flag.
  • Adds a Django migration to update the retired field help text for both SubsidyAccessPolicy and its historical model.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
enterprise_access/apps/subsidy_access_policy/models.py Adjusts the retired field’s help_text shown in admin/forms.
enterprise_access/apps/subsidy_access_policy/migrations/0031_fix_subsidyaccesspolicy_retired_helptext.py Applies the help text update at the DB schema metadata level for both current and historical models.

Comment on lines 195 to 200
retired = models.BooleanField(
default=False,
help_text=(
"True means redeemability of content using this policy has been enabled. "
"Set this to False to deactivate the policy but keep it visible from an admin's perspective "
"False means redeemability of content using this policy has been enabled. "
"Set this to True to deactivate the policy but keep it visible from an admin's perspective "
"(useful when you want to just expire a policy without expiring the whole plan)."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this feedback from co-pilot true?

migrations.AlterField(
model_name='historicalsubsidyaccesspolicy',
name='retired',
field=models.BooleanField(default=False, help_text="False means redeemability of content using this policy has been enabled. Set this to True to deactivate the policy but keep it visible from an admin's perspective (useful when you want to just expire a policy without expiring the whole plan)."),
migrations.AlterField(
model_name='subsidyaccesspolicy',
name='retired',
field=models.BooleanField(default=False, help_text="False means redeemability of content using this policy has been enabled. Set this to True to deactivate the policy but keep it visible from an admin's perspective (useful when you want to just expire a policy without expiring the whole plan)."),
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.44%. Comparing base (eeefdfb) to head (ae65a3b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #214   +/-   ##
=======================================
  Coverage   86.44%   86.44%           
=======================================
  Files         154      154           
  Lines       12848    12848           
  Branches     1227     1227           
=======================================
  Hits        11107    11107           
  Misses       1426     1426           
  Partials      315      315           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@brobro10000 brobro10000 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved to unblock. Only 1 copilot to double check on.

Comment on lines 195 to 200
retired = models.BooleanField(
default=False,
help_text=(
"True means redeemability of content using this policy has been enabled. "
"Set this to False to deactivate the policy but keep it visible from an admin's perspective "
"False means redeemability of content using this policy has been enabled. "
"Set this to True to deactivate the policy but keep it visible from an admin's perspective "
"(useful when you want to just expire a policy without expiring the whole plan)."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this feedback from co-pilot true?

@pwnage101 pwnage101 force-pushed the pwnage101/fix-policy-retired-helptext branch from f61feae to ae65a3b Compare June 24, 2026 18:35
@pwnage101 pwnage101 changed the title fix: flip polarity of helptext on retired field (SubsidyAccessPolicy) fix: make active and retired fields clearer (SubsidyAccessPolicy) Jun 24, 2026
@pwnage101 pwnage101 requested a review from Copilot June 24, 2026 18:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

Comment thread enterprise_access/apps/subsidy_access_policy/models.py
Comment thread enterprise_access/apps/subsidy_access_policy/models.py
@pwnage101 pwnage101 merged commit 22ade54 into main Jun 24, 2026
7 checks passed
@pwnage101 pwnage101 deleted the pwnage101/fix-policy-retired-helptext branch June 24, 2026 23:34
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.

3 participants