Working on issue #558 - Zendesk import - import ticket statistic value does not include archived tickets.

This commit is contained in:
Thorsten Eckel 2017-01-13 11:46:31 +01:00
parent 2f955f4087
commit 11ecd4c535

View file

@ -50,12 +50,23 @@ module Import
} }
result.each { |object, _score| 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) Cache.write('import_zendesk_stats', result)
result result
end 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 end
end end