Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Don't allow album release date to be in the future #141

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

floehopper
Copy link
Member

TODO: We need to decide what to do about the 2 existing albums that this would render invalid.

@floehopper floehopper force-pushed the restrict-album-released-at-to-dates-in-the-past branch from b69e57b to 66f9219 Compare January 9, 2024 10:46
@floehopper
Copy link
Member Author

@chrislo

There are 2 existing published albums with release dates in the future in production:

Album.published.where('released_at > ?', Time.zone.today).map { |a| [a.artist.slug, a.slug] }
# => [["clive-murray", "love-and-painkillers"], ["elite-panic", "full-cold-moon"]]

I suggest we manually change these release dates to be today's date and email the users to correct them. If they have a good reason for setting the release date in the future, we can think again.

We can then apply the validation in this PR.

And I'd suggest we create a new issue about scheduling publication of an album in the future if you think that might be useful...?

@chrislo
Copy link
Member

chrislo commented Jan 9, 2024

@floehopper - this looks great. I can't think of a good reason why artists would want to set a release date in the future if there wasn't a way of scheduling the publication on a certain day. That kind of scheduling certainly gets used a lot on Bandcamp with pre-release purchasing and notification to followers when an album is released. (As an aside I think some of that is to do with Bandcamp's charts - gathering a bunch of pre-sales is a way of bumping your chances of appearing in the best sellers lists).

In the case of those two albums, fixing the data and contacting the artists to ask them what they wanted to achieve sounds good.

I think scheduling publication and having a cron job to do that is a good idea! It'll have more value when we have followers and notifications of releases, but it'd be good to do in advance of that too.

@floehopper
Copy link
Member Author

I'm going to do this now.

@floehopper floehopper force-pushed the restrict-album-released-at-to-dates-in-the-past branch from 66f9219 to d918ccc Compare January 9, 2024 21:57
@floehopper floehopper merged commit d918ccc into main Jan 9, 2024
2 checks passed
@chrislo chrislo temporarily deployed to main - sidekiq-worker January 9, 2024 22:02 — with Render Inactive
@chrislo chrislo temporarily deployed to main - jam January 9, 2024 22:02 — with Render Inactive
@floehopper floehopper deleted the restrict-album-released-at-to-dates-in-the-past branch January 9, 2024 22:24
@floehopper
Copy link
Member Author

All done

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