Update Foundry List

This page JudgeApps | Log In (which is restricted to admins/foundry admins)

Shows the Apps version of the Judge Foundry roll.
Currently it has 3 columns: Name, Level and a button to click to remove from Judge Foundry.

In order to make monthly maintenance easier, the JF team requests a feature update to this page.

Feature set 1 (still requires manual work, but can be done on the page)

  • Make the page sortable by each column
  • Add columns
    ** stripe subscription id
    ** current period end of the user’s stripe subscription (for active subscrptions, this is the first day of the next month)
    ** the stripe subscription status (canceled, active, past_due)
    ** user email

Feature 2 - batch remove

  • add a column with a checkbox
  • add a button to remove all selected users
    ** confirmation should list all of the users to be removed and flag any users who’s subscription is acitve, or current period end date is in the last 60 days

Feature 2 - status and automatic emails

  • add column - user status with values (active, delinquent)
  • add additional bulk actions
    ** mark user delinquent - makes the user status delinquent, sends a form email
    ** remove user - same as above, removes the user, but sends a different email
    ** reinstate user - makes the user status active

Handling some of the low-hanging fruit here:

Make the page sortable by each column

It is sortable by clicking on the column headers, I will update it to sort properly by “last, first name” and by numerical level.

stripe subscription id

Will add this.

current period end of the user’s stripe subscription (for active subscrptions, this is the first day of the next month)
the stripe subscription status (canceled, active, past_due)

I’m not sure how we would know this. The database only has the strip ID

user email

Will add this.

https://docs.stripe.com/api/subscriptions/retrieve

It probably doesn’t make sense to call the Stripe API 1000 times when this page is loaded, db caching the subscription on a 24 hour TTL would probably work but that’s a more complicated change.

Looks like the next path allows us to grab them all, 100 per page. Will investigate the python library to see how to get that as a proper iterator

Just so you know my use case, the last active date is a proxy for the last time they successfully paid, but also goes into the past.

Accounts that are past_due or canceled, I can’t tell if they were 15, or 30 or 60 days ago, but with the last active date, I can tell how long it has been since they have been paid up.

My use case is to sort members by last active date, and then email the folks who have dates in the past, removing members who are >60 days.