Working on issue #558 - Zendesk import - import ticket statistic value does not include archived tickets.
This commit is contained in:
parent
2f955f4087
commit
11ecd4c535
1 changed files with 12 additions and 1 deletions
|
@ -50,12 +50,23 @@ module Import
|
|||
}
|
||||
|
||||
result.each { |object, _score|
|
||||
result[ object ] = Import::Zendesk::Requester.client.send( object.underscore.to_sym ).count!
|
||||
result[ object ] = statistic_count(object)
|
||||
}
|
||||
|
||||
Cache.write('import_zendesk_stats', result)
|
||||
result
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def statistic_count(object)
|
||||
statistic_count_data(object).count!
|
||||
end
|
||||
|
||||
def statistic_count_data(object)
|
||||
return all_tickets if object == 'Tickets'
|
||||
Import::Zendesk::Requester.client.send( object.underscore.to_sym )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue