0
  @   	ˆl–Ðz¾”d
eJeAà�q�)‹Fÿ�þB–nV^¢hŒÊð?ŸÈ‚ÀÇ_ŠI|¥�+Wé3ž¯ÇÆ     	#! /usr/bin/python3

import sys

from osgeo.gdal import deprecation_warn

# import osgeo_utils.gdal_calc as a convenience to use as a script
from osgeo_utils.gdal_calc import *  # noqa
from osgeo_utils.gdal_calc import main

deprecation_warn("gdal_calc")
sys.exit(main(sys.argv))
  5   ˆl–Ðz¾”d
i?u8 \¸Ó× 1hß�þB gÁ”¬”ÏÊƒh¹ÉÈÇ      MAJOR=7
MINOR=132
DEVNAME=vcsa4
  D   ˆl–Ðz¾”ªC]Šq@=q¦®41hß�þBéF³��É€iÏçËƒp"Ê_�uÐb&=LyZËcõÊÉ ê    # Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/

require 'rails_helper'
require 'zendesk_api'

RSpec.describe Sequencer::Sequence::Import::Zendesk::Ticket, db_strategy: :reset, sequencer: :sequence do

  context 'when importing tickets from Zendesk' do

    let(:group) { create(:group) }

    let(:owner) { create(:agent, group_ids: [group.id]) }

    let(:customer) { create(:customer) }

    let(:resource) do
      ZendeskAPI::Ticket.new(
        nil,
        {
          'id'                    => 2,
          'external_id'           => nil,
          'via'                   => {
            'channel' => 'email',
            'source'  => {
              'from' => {
                'address' => 'john.doe@example.com',
                'name'    => 'John Doe'
              },
              'to'   => {
                'name'    => 'Zendesk',
                'address' => 'zendesk-user@example.com'
              },
              'rel'  => nil
            }
          },
          'created_at'            => '2015-07-19 22:44:20 UTC',
          'updated_at'            => '2016-05-19 14:00:42 UTC',
          'type'                  => 'question',
          'subject'               => 'test',
          'raw_subject'           => 'test',
          'description'           => 'test email',
          'priority'              => 'urgent',
          'status'                => 'pending',
          'recipient'             => 'zendesk-user@example.com',
          'requester_id'          => 1_202_726_611,
          'submitter_id'          => 1_147_801_812,
          'assignee_id'           => 1_150_734_731,
          'organization_id'       => 154_755_561,
          'group_id'              => 24_554_931,
          'collaborator_ids'      => [],
          'follower_ids'          => [],
          'email_cc_ids'          => [],
          'forum_topic_id'        => nil,
          'problem_id'            => nil,
          'has_incidents'         => false,
          'is_public'             => true,
          'due_at'                => nil,
          'tags'                  => %w[
            anothertag
            import
            key2
            newtag
            otrs
            zammad
          ],
          'custom_fields'         => [
            { 'id'    => 1001,
              'value' => 'key_1' },
            { 'id'    => 1002,
              'value' => true },
            { 'id'    => 1003,
              'value' => %w[key_1 key_2] },
          ],
          'satisfaction_rating'   => nil,
          'sharing_agreement_ids' => [],
          'followup_ids'          => [],
          'brand_id'              => 670_701,
          'allow_channelback'     => false,
          'allow_attachments'     => true,
          'generated_timestamp'   => 1_463_666_442
        }
      )
    end

    let(:group_map) do
      {
        24_554_931 => group.id,
      }
    end

    let(:user_map) do
      {
        1_150_734_731 => owner.id,
        1_202_726_611 => customer.id,
      }
    end

    let(:organization_map) do
      {}
    end

    let(:ticket_field_map) do
      {
        1001 => 'custom_dropdown',
        1002 => 'custom_checkbox',
        1003 => 'custom_multiselect',
      }
    end

    let(:process_payload) do
      {
        import_job:       build_stubbed(:import_job, name: 'Import::Zendesk', payload: {}),
        dry_run:          false,
        resource:         resource,
        group_map:        group_map,
        user_map:         user_map,
        organization_map: