Created
October 13, 2021 12:50
-
-
Save npotier/be13486b34db0f19a834a392ade2d3f8 to your computer and use it in GitHub Desktop.
Delete Redmine issues from command line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://www.redmine.org/boards/2/topics/62095 | |
# RAILS_ENV=production bin/rails console | |
> p = Project.find("$project_name") | |
> p.issues.where("closed_on < '#{365.days.ago}'").each(&:destroy) | |
# To perform this actions across all projects... | |
> Issue.where("closed_on < '#{365.days.ago}'").each(&:destroy) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment