Class: Artisan::Activity::IterationAuditor

Inherits:
Object
  • Object
show all
Defined in:
lib/artisan/activity/iteration_auditor.rb

Class Method Summary collapse

Class Method Details

.completed(iteration_id, project_id, user_id) ⇒ Object



20
21
22
23
# File 'lib/artisan/activity/iteration_auditor.rb', line 20

def self.completed(iteration_id, project_id, user_id)
  create_change(:source_id => iteration_id, :project_id => project_id, :user_id => user_id, :event => :complete,
                      :original_fields => {}, :changed_fields => {})
end

.create_change(attributes) ⇒ Object



36
37
38
# File 'lib/artisan/activity/iteration_auditor.rb', line 36

def self.create_change(attributes)
  Repository.change.create_iteration_change(attributes)
end

.created(iteration_id, project_id, user_id, new_attributes) ⇒ Object



5
6
7
8
# File 'lib/artisan/activity/iteration_auditor.rb', line 5

def self.created(iteration_id, project_id, user_id, new_attributes)
  create_change(:source_id => iteration_id, :project_id => project_id,  :user_id => user_id, :event => :create,
                      :changed_fields => new_attributes)
end

.deleted(iteration_id, project_id, user_id) ⇒ Object



15
16
17
18
# File 'lib/artisan/activity/iteration_auditor.rb', line 15

def self.deleted(iteration_id, project_id, user_id)
  create_change(:source_id => iteration_id, :project_id => project_id, :user_id => user_id, :event => :delete,
                      :original_fields => {}, :changed_fields => {})
end

.resumed(iteration_id, project_id, user_id) ⇒ Object



25
26
27
28
# File 'lib/artisan/activity/iteration_auditor.rb', line 25

def self.resumed(iteration_id, project_id, user_id)
  create_change(:source_id => iteration_id, :project_id => project_id, :user_id => user_id, :event => :resume,
                      :original_fields => {}, :changed_fields => {})
end

.started(iteration_id, project_id, user_id) ⇒ Object



30
31
32
33
# File 'lib/artisan/activity/iteration_auditor.rb', line 30

def self.started(iteration_id, project_id, user_id)
  create_change(:source_id => iteration_id, :project_id => project_id, :user_id => user_id, :event => :start,
                      :original_fields => {}, :changed_fields => {})
end

.updated(iteration_id, project_id, user_id, original_attributes, new_attributes) ⇒ Object



10
11
12
13
# File 'lib/artisan/activity/iteration_auditor.rb', line 10

def self.updated(iteration_id, project_id, user_id, original_attributes, new_attributes)
  create_change(:source_id => iteration_id, :project_id => project_id, :user_id => user_id, :event => :update,
                      :original_fields => original_attributes, :changed_fields => new_attributes)
end