100
  6   #ˆl–Ðz¾”ªC]Šq@=q¦®41hß�þ[yÕœlH n”BþÙƒAoØÃÁÖ ‡    ## Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/

class Sequencer::Sequence::Import::Kayako::Case < Sequencer::Sequence::Base

  def self.sequence
    [
      'Common::ModelClass::Ticket',
      'Import::Kayako::Case::Skip::Deleted',
      'Import::Kayako::Case::Skip::Suspended',
      'Import::Kayako::Common::CreatedById',
      'Import::Kayako::Common::ArticleSenderId',
      'Import::Kayako::Case::UpdatedById',
      'Import::Kayako::Case::CustomerId',
      'Import::Kayako::Case::OwnerId',
      'Import::Kayako::Case::GroupId',
      'Import::Kayako::Case::OrganizationId',
      'Import::Kayako::Case::PriorityId',
      'Import::Kayako::Case::StateId',
      'Import::Kayako::Case::Type',
      'Import::Kayako::Common::ArticleSourceChannel',
      'Import::Kayako::Case::Mapping',
      'Import::Kayako::Mapping::Timestamps',
      'Import::Kayako::Mapping::CustomFields',
      'Import::Common::Model::FindBy::Id',
      'Import::Common::Model::Update',
      'Import::Common::Model::Create',
      'Import::Common::Model::Save',
      'Import::Common::Model::ResetPrimaryKeySequence',
      'Import::Kayako::MapId',
      'Import::Kayako::Case::Tags',
      'Import::Kayako::Case::Posts',
      'Import::Common::Model::Statistics::Diff::ModelKey',
      'Import::Common::ImportJob::Statistics::Update',
      'Import::Common::ImportJob::Statistics::Store',
    ]
  end
end
  5   %ˆl–Ðz¾” ”Ê:”Ê�jãm\ŠbÑ¿�þJÛK7(Z|@ˆG�üÿÚƒeÇÙÂ× T    %#!/usr/bin/perl

=head1 NAME

dh_bugfiles - install bug reporting customization files into package build directories

=cut

use strict;
use warnings;
use Debian::Debhelper::Dh_Lib;

our $VERSION = DH_BUILTIN_VERSION;

=head1 SYNOPSIS

B<dh_bugfiles> [B<-A>] [S<I<debhelper options>>]

=head1 DESCRIPTION

B<dh_bugfiles> is a debhelper program that is responsible for installing
bug reporting customization files (bug scripts and/or bug control files
and/or presubj files) into package build directories.

=head1 FILES

=over 4

=item debian/I<package>.bug-script

This is the script to be run by the bug reporting program for generating a bug
report template. This file is installed as F<usr/share/bug/package> in the
package build directory if no other types of bug reporting customization
files are going to be installed for the package in question. Otherwise,
this file is installed as F<usr/share/bug/package/script>. Finally, the
installed script is given execute permissions.

=item debian/I<package>.bug-control

It is the bug control file containing some directions for the bug reporting
tool. This file is installed as F<usr/share/bug/package/control> in the
package build directory.

=item debian/I<package>.bug-presubj

The contents of this file are displayed to the user by the bug reporting
tool before allowing the user to write a bug report on the package to the
Debian Bug Tracking System. This file is installed as
F<usr/share/bug/package/presubj> in the package build directory.

=back

=head1 OPTIONS

=over 4

=item B<-A>, B<--all>

Install F<debian/bug-*> files to ALL packages acted on when respective
F<debian/package.bug-*> files do not exist. Normally, F<debian/bug-*> will
be installed to the first package only.

=back

=cut

init();

# Types of bug files this debhelper program handles.
# Hash value is the name of the pkgfile of the respective
# type.
my %bugfile_types = (
	"script" => "bug-script",
	"control" => "bug-control",
	"presubj" => "bug-presubj",
);
# PROMISE: DH NOOP WITHOUT bug-script bug-control bug-presubj cli-options()

foreach my $package (@{$dh{DOPACKAGES}}) {
	next if is_udeb($package);

	my $tmp=tmpdir($package);
	my $p_dir="${tmp}/usr/share/bug";
	my $dir="${p_dir}/$package";
	
	# Gather information which bug files are available for the
	# package in question
	my %bugfiles=();
	while (my ($type, $pkgfilename) = each(%bugfile_types)) {
		my $file=pkgfile($package,$pkgfilename);
		if ($file) {
			$bugfiles{$type}=$file;
		}
		elsif (-f "debian/$pkgfilename" && $dh{PARAMS_ALL