bloom-housing / bloom

Bloom is Exygy’s affordable housing platform. Bloom's goal is to be a single entry point for affordable housing seekers and a hub for application and listing management for developers.
https://bloomhousing.com
Apache License 2.0
33 stars 25 forks source link

release: lottery expiration and cron job #4225

Closed mcgarrye closed 3 months ago

mcgarrye commented 3 months ago

This PR addresses #(4058)

Description

Releases lottery expiration work: https://github.com/bloom-housing/bloom/pull/4184

How Can This Be Tested/Reviewed?

Setup: add LOTTERY_DAYS_TILL_EXPIRY=45 to your api and partners env files

Sign into Partners Portal and close a listing with a lottery As an admin, go to the Lottery tab of the closed listing and open the run modal. Verify that expiration statement is present at the top. Run the lottery, releasedToPartners. As a partner or jurisdictional admin, go to the Lottery tab of the closed listing with a released lottery. Publish the lottery. Verify yellow warning is present at the top of the section with the expiration date included. In the database, edit the closedAt date on the listing to 45 (or more) days ago. Or change your env variable to 0. Sign into the Swagger UI page as an admin or jurisdictional admin. Trigger the cron job with the listings/expireLotteries endpoint. Sign into the Partners Portal as a partner or jurisdictional admin, go to the Lottery tab of the closed listing with a ran lottery. Verify lottery is expired and no data is shown.

Author Checklist:

Review Process: