The daily_summary.rb script searches through your projects to find and output all of the Issues you added to Dradis in the past 24 hours.
The meat of the script is the following loop:
recent_projects = Project.where("projects.updated_at >= ? AND projects.updated_at <= ?", yest, DateTime.now) recent_projects.each do |project| with_scope(project) do issue_library = Node.issue_library Issue.where(node_id: issue_library.id).where("notes.updated_at >= ? AND notes.updated_at <= ?", yest, DateTime.now).each do |issue| puts "* Recent Issue: '#{issue.title}'" puts " Added to Project: '#{project.name}' on '#{issue.updated_at}' " puts " " end end end
We cycle through each of the recent projects. For each of them, we gather all the issues that were updated in the past 24 hours with the following line:
Issue.where(node_id: issue_library.id).where("notes.updated_at >= ? AND notes.updated_at <= ?", yest, DateTime.now).each do |issue|
Then, we output each of the recently updated Issues along with the relevant Project name and the date/time stamp.
Next help article: [scripting] Statistics on Issues and Projects →
Your email is kept private. We don't do the spam thing.