In https://github.com/CUCentralAdvancement/crowdfunding-cu/issues/29, the code reads from a redis instance on Heroku but there is no easy way to set values. Sure, I can do this via the command line, but actual users won't want to do that...or search for existing keys that way. The most logical place to put this is in the CMS since it has user management already.
The easiest and most straightforward way to manage this is to create a scaffold for a Redirect resource. This way, the redirect can expire and have other properties. This will duplicate the redirect data and allow for it to be reloaded if the redis instance fails.
Acceptance Criteria
[x] rails g scaffold Redirect source:string redirect:string expiration:datetime status:enum
[x] Add /admin/redirects resources routes for editing
[x] Add after_action on the Redirect model to post to redis after successful update
[x] Add help article for using this feature. Place the help link by the title of the listing, new, and edit forms.
[x] Seed data using redirects.json from crowdfunding-cu
Next Issue
After this issue is completed, the whole vanity URL process can move to the CMS and crowdfunding-cu, and Drupal 7 will not be needed for that part of the fund update process.
[ ] Add "owner" to models? The Workfront form can capture the email, which is all that's needed to prompt a decision on whether to expire/deactivate things.
[ ] Deactivate redirect removes the key from Redis vs. deleting the redirect. Otherwise, the status field is useless.
In https://github.com/CUCentralAdvancement/crowdfunding-cu/issues/29, the code reads from a redis instance on Heroku but there is no easy way to set values. Sure, I can do this via the command line, but actual users won't want to do that...or search for existing keys that way. The most logical place to put this is in the CMS since it has user management already.
The easiest and most straightforward way to manage this is to create a scaffold for a Redirect resource. This way, the redirect can expire and have other properties. This will duplicate the redirect data and allow for it to be reloaded if the redis instance fails.
Acceptance Criteria
rails g scaffold Redirect source:string redirect:string expiration:datetime status:enum
/admin/redirects
resources routes for editingafter_action
on the Redirect model to post to redis after successful updateredirects.json
from crowdfunding-cuNext Issue
After this issue is completed, the whole vanity URL process can move to the CMS and crowdfunding-cu, and Drupal 7 will not be needed for that part of the fund update process.