Skip to content

Automated Declining for Changes-Requested? #980

Answered by JustinBack
DrKJeff16 asked this question in Ideas
Discussion options

You must be logged in to vote

This has been implemented now!

namespace :points do
desc "Decline points with changes requested"
task decline: :environment do
include FontAwesome::Rails::IconHelper
include ApplicationHelper
include ActionView::Helpers::TagHelper
points = Point.all
matches = points.where("updated_at < ? and status = 'changes-requested'", 2.months.ago )
puts points.length
puts matches.length
matches.each do |point|
point.status = "declined"
if point.save
puts "Point ID: "+ point.id.to_s
@point_comment = PointComment.new()
@point_comment.summary =

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by JustinBack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #975 on January 27, 2021 23:54.