@CustomFields = (
    {
        Name        => 'Organization Type',
        LookupType  => 'RT::User',
        Type        => 'SelectSingle',
        RenderType  => 'Dropdown',
        Disabled    => 0,
        Description => 'Organization Type',
        Values      => [
            { Name => 'General Administration',  Description => '',  SortOrder => 1 },
            { Name => 'Regional Administration',  Description => '',  SortOrder => 2 },
            { Name => 'Local Institution',  Description => '',  SortOrder => 3 },
            { Name => 'Company',  Description => '',  SortOrder => 4 },
            { Name => 'University',  Description => '',  SortOrder => 5 },
            { Name => 'Other',  Description => '',  SortOrder => 6 },
        ],
    },
    {
        Name        => 'Group type',
        LookupType  => 'RT::Group',
        Type        => 'SelectSingle',
        RenderType  => 'Dropdown',
        Disabled    => 0,
        Description => 'Lucia Group type',
        Values      => [
            { Name => 'External company',  Description => '',  SortOrder => 0 },
        ],
    },
    {
        Name        => 'Situation',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'SelectSingle',
        RenderType  => 'Dropdown',
        Disabled    => 0,
        Description => 'Ticket situation',
        Pattern     => '(?#Mandatory).',
        Values      => [
            { Name => 'No activity',  Description => '',  SortOrder => 1 },
            { Name => 'Under investigation',  Description => '',  SortOrder => 2 },
            { Name => 'Request information',  Description => '',  SortOrder => 3 }
        ],
    },
    {
        Name        => 'Notification Type',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'SelectSingle',
        RenderType  => 'Dropdown',
        Disabled    => 0,
        Description => '',
        Pattern     => '(?#Mandatory).',
        Values      => [
            { Name => 'Information',  SortOrder => 0 },
            { Name => 'Incident',  SortOrder => 0 },
        ],
    },
    {
        Name        => 'Organization Type',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'SelectSingle',
        RenderType  => 'Dropdown',
        Disabled    => 0,
        Description => 'Organization Type',
        Pattern     => '(?#Mandatory).',
        Values      => [
            { Name => 'General Administration',  Description => '',  SortOrder => 1 },
            { Name => 'Regional Administration',  Description => '',  SortOrder => 2 },
            { Name => 'Local Institution',  Description => '',  SortOrder => 3 },
            { Name => 'Company',  Description => '',  SortOrder => 4 },
            { Name => 'University',  Description => '',  SortOrder => 5 },
            { Name => 'Other',  Description => '',  SortOrder => 6 },
        ],
    },
    {
        Name        => 'Cyber Incident Classification',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'SelectSingle',
        RenderType  => 'Dropdown',
        Disabled    => 0,
        Description => 'Cyber Incident Classification',
        Pattern     => '(?#Mandatory).',
        Values      => [
            { Name => 'Malware',  Description => 'Software that is intended to infiltrate or damage a computer without the knowledge of the owner and with very different purposes',  SortOrder => 1 },
            { Name => 'Information compromised',  Description => 'Incidents related to accessand release (Confidentiality), modification or deletion (Integrity) of non-public information',  SortOrder => 2 },
            { Name => 'Abusive content',      Description => 'Attacks aimed at the image of the organization or the use of electronic media for other uses such as advertising or coercion', SortOrder => 3 },
            { Name => 'Availability',  Description => 'Attacks focused on getting the unavailability of systems of organisms damaging their image and productivity',  SortOrder => 4 },
            { Name => 'Fraud',  Description => 'Incidents involving the release of information subject to any law of privacy or intellectual property, or phishing in all terms',  SortOrder => 5 },
            { Name => 'Intrusions',  Description => 'Targeted attacks exploiting vulnerabilities to fraudulently enter in the systems of an organization',  SortOrder => 6 },
            { Name => 'Security policy',  Description => 'Incidents involving possible violations of policies',  SortOrder => 7 },
            { Name => 'Information gathering',  Description => 'Attacks intended to gather, in different ways, crucial information for further more advanced attacks via social engineering or vulnerability identification',  SortOrder => 8 },
            { Name => 'Others',  Description => 'Classification of events not included in the previous sections',  SortOrder => 9 },
            { Name => 'Test',  Description => '',  SortOrder => 10 },
        ],
    },
    {
        Name        => 'Type of Cyber Incident',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'SelectSingle',
        RenderType  => 'Dropdown',
        Disabled    => 0,
        Description => 'Type of Cyber Incident',
        Pattern     => '(?#Mandatory).',
        BasedOn     => 'Cyber Incident Classification',
        Values      => [
            { Name => 'Worm',  Category => 'Malware', SortOrder => 1 },
            { Name => 'Remote Access Tools (RAT)',  Category => 'Malware', SortOrder => 2 },
            { Name => 'Ransomware',  Category => 'Malware', SortOrder => 3 },
            { Name => 'Rootkit',  Category => 'Malware', SortOrder => 4 },
            { Name => 'Spyware',  Category => 'Malware', SortOrder => 5 },
            { Name => 'Trojan',  Category => 'Malware', SortOrder => 6 },
            { Name => 'Virus',  Category => 'Malware', SortOrder => 7 },
                        
            { Name => 'Unauthorized access to information',  Category => 'Information compromised', SortOrder => 10 },
            { Name => 'Information exfiltration',  Category => 'Information compromised', SortOrder => 11 },
            { Name => 'Unauthorized modification and deletion of information',  Category => 'Information compromised', SortOrder => 12 },
            { Name => 'Unauthorized disclosure of information',  Category => 'Information compromised', SortOrder => 13 },
            
            { Name => 'Harassment / Extortion / Offensive comments',  Category => 'Abusive content', SortOrder => 15 },
            { Name => 'Child abuse / Racism / Apology for violence / Crime, etc.',  Category => 'Abusive content', SortOrder => 16 },
            { Name => 'Spam',  Category => 'Abusive content', SortOrder => 17 },
            
            { Name => 'DoS / DDoS',  Category => 'Availability', SortOrder => 20 },
            { Name => 'Human error',  Category => 'Availability', SortOrder => 21 },
            { Name => 'Failure HW / SW',  Category => 'Availability', SortOrder => 22 },
            { Name => 'Sabotage',  Category => 'Availability', SortOrder => 23 },
            
            { Name => 'Identity theft / Spoofing',  Category => 'Fraud', SortOrder => 26 },
            { Name => 'Unauthorized use of resources',  Category => 'Fraud', SortOrder => 27 },
            { Name => 'Illegitimate use of credentials',  Category => 'Fraud', SortOrder => 28 },
            { Name => 'Intellectual or industrial property rights violation',  Category => 'Fraud', SortOrder => 29 },
            
            { Name => 'Brute force attack',  Category => 'Intrusions', SortOrder => 35 },
            { Name => 'User account compromised',  Category => 'Intrusions', SortOrder => 36 },
            { Name => 'Cross-Site Scripting (XSS)',  Category => 'Intrusions', SortOrder => 37 },
            { Name => 'Defacement',  Category => 'Intrusions', SortOrder => 38 },
            { Name => 'Exploitation of hardware vulnerability',  Category => 'Intrusions', SortOrder => 39 },
            { Name => 'Exploitation of software vulnerability',  Category => 'Intrusions', SortOrder => 40 },
            { Name => 'Cross-Site Request Forgery (CSRF)',  Category => 'Intrusions', SortOrder => 41 },
            { Name => 'Remote file injection',  Category => 'Intrusions', SortOrder => 42 },
            { Name => 'SQL injection',  Category => 'Intrusions', SortOrder => 43 },
            { Name => 'Pharming',  Category => 'Intrusions', SortOrder => 44 },
            { Name => 'Spear phishing',  Category => 'Intrusions', SortOrder => 45 },
            
            { Name => 'Access to unauthorized services',  Category => 'Security policy', SortOrder => 50 },
            { Name => 'Privilege abuse by users',  Category => 'Security policy', SortOrder => 51 },
            
            { Name => 'Vulnerability identification',  Category => 'Information gathering', SortOrder => 55 },
            { Name => 'Social engineering',  Category => 'Information gathering', SortOrder => 56 },
            { Name => 'Phishing',  Category => 'Information gathering', SortOrder => 57 },
            { Name => 'Sniffing',  Category => 'Information gathering', SortOrder => 58 },
            
            { Name => 'Others',  Category => 'Others', SortOrder => 60 },
            
            { Name => 'Test',  Category => 'Test', SortOrder => 65 },
            
        ],
    },
    {
        Name        => 'Classification Level',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'SelectSingle',
        RenderType  => 'Dropdown',
        Disabled    => 0,
        Description => 'Incident classification level',
        Pattern     => '(?#Mandatory).',
        Values      => [
            { Name => 'Not classified',  SortOrder => 1 },        
            { Name => 'Limited diffusion',  SortOrder => 2 },
            { Name => 'Confidential',  SortOrder => 3 },
            { Name => 'Classified',  SortOrder => 4 },
            { Name => 'Secret',  SortOrder => 5 },
        ],
    },
    {
        Name        => 'Reliability',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'SelectSingle',
        RenderType  => 'Dropdown',
        Disabled    => 0,
        Description => '',
        Pattern     => '(?#Mandatory).',
        Values      => [
            { Name => 'Low',  SortOrder => 1 },
            { Name => 'Medium',  SortOrder => 2 },
            { Name => 'High',  SortOrder => 3 },
        ],
    },
    {
        Name        => 'Threat Source',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'SelectSingle',
        RenderType  => 'Dropdown',
        Disabled    => 0,
        Description => '',
        Values      => [],
    },
    {
        Name        => 'Campaign',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'SelectSingle',
        RenderType  => 'Dropdown',
        Disabled    => 0,
        Description => 'Incident campaign',
        Values      => [],
    },
    
    
    {
        Name        => 'Invested Resources',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'SelectSingle',
        RenderType  => 'Dropdown',
        Disabled    => 0,
        Description => '',
        Values      => [
            { Name => '1 person',  SortOrder => 1 },
            { Name => '2 people',  SortOrder => 2 },
            { Name => '3-5 people',  SortOrder => 3 },
            { Name => 'More than 5 people',  SortOrder => 4 },
        ],
    },
    {
        Name        => 'System Category according to ENS',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'SelectSingle',
        RenderType  => 'Dropdown',
        Disabled    => 0,
        Description => '',
        Values      => [
            { Name => 'Not applicable',  SortOrder => 0 },
            { Name => 'Low',  SortOrder => 1 },
            { Name => 'Medium',  SortOrder => 2 },
            { Name => 'High',  SortOrder => 3 },
        ],
    },
    {
        Name        => 'Impact',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'SelectSingle',
        RenderType  => 'Dropdown',
        Disabled    => 0,
        Description => '',
        Values      => [
            { Name => 'Not applicable',  SortOrder => 0 },
            { Name => 'Low',  SortOrder => 1 },
            { Name => 'Medium',  SortOrder => 2 },
            { Name => 'High',  SortOrder => 3 },
            { Name => 'Very high',  SortOrder => 4 },
            { Name => 'Critical',  SortOrder => 5 },
        ],
    },
    {
        Name        => 'Number of Affected Systems',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'SelectSingle',
        RenderType  => 'Dropdown',
        Disabled    => 0,
        Description => '',
        Values      => [
            { Name => 'Not applicable',  SortOrder => 0 },
            { Name => 'Less than 10',  SortOrder => 1 },
            { Name => 'Between 10 and 50',  SortOrder => 2 },
            { Name => 'More than 50',  SortOrder => 3 },
        ],
    },
    {
        Name        => 'Incident Cause',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'SelectMultiple',
        RenderType  => 'List',
        Disabled    => 0,
        Description => 'Incident Cause',
        Values      => [
            { Name => 'C.01 - Breach or lack of safety regulations',  SortOrder => 0 },
            { Name => 'C.02 - Breach or lack of safety procedures',  SortOrder => 0 },
            { Name => 'C.03 - Breach of authorization process',  SortOrder => 0 },
            { Name => 'C.04 - Technical or operational failure of identification or authentication',  SortOrder => 0 },
            { Name => 'C.05 - Technical or operational failure of access controls',  SortOrder => 0 },
            { Name => 'C.06 - Unauthorized local access',  SortOrder => 0 },
            { Name => 'C.07 - Unauthorized remote access',  SortOrder => 0 },
            { Name => 'C.08 - Absence or deficiency of segregation of duties and tasks',  SortOrder => 0 },
            { Name => 'C.09 - Incorrect data input that have been not detected in time',  SortOrder => 0 },
            { Name => 'C.10 - Inappropriate configuration',  SortOrder => 0 },
            { Name => 'C.11 - Absence or deficiency of maintenance',  SortOrder => 0 },
            { Name => 'C.12 - Inadequate execution of a change configuration',  SortOrder => 0 },
            { Name => 'C.13 - Lack of staff awareness',  SortOrder => 0 },
            { Name => 'C.14 - Flaws in staff training',  SortOrder => 0 },
            { Name => 'C.15 - Not clear workplaces',  SortOrder => 0 },
            { Name => 'C.16 - Remaining unauthorized information',  SortOrder => 0 },
            { Name => 'C.17 - Defects in the specification of a SW application',  SortOrder => 0 },
            { Name => 'C.18 - Defects in the implementation of a SW application',  SortOrder => 0 },
            { Name => 'C.19 - Start-up of defective equipment: SW / HW / COMMS',  SortOrder => 0 },
            { Name => 'C.20 - External service. Caused by negligence of the supplier',  SortOrder => 0 },
            { Name => 'C.21 - External service. They have not been reported within agreed timeframes and channels',  SortOrder => 0 },
            { Name => 'C.22 - External service. Responsible supplier has failed to fulfill treaty obligations',  SortOrder => 0 },
            { Name => 'C.99 - Not applicable',  SortOrder => 0 },
        ],
    },
    {
        Name        => 'Incidences during Resolution',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'SelectMultiple',
        RenderType  => 'List',
        Disabled    => 0,
        Description => '',
        Values      => [
            { Name => 'II.01 - A method of action was not planned or was different from the scalabled by default',  SortOrder => 0 },
            { Name => 'II.02 - The event log has been insufficient to analyze the consequences',  SortOrder => 0 },
            { Name => 'II.03 - It has been impossible to use the activity logs because they have disappeared or have been tampered',  SortOrder => 0 },
            { Name => 'II.04 - The assurance power system has been required and it has failed',  SortOrder => 0 },
            { Name => 'II.05 - The fire protection system has been required and it has failed',  SortOrder => 0 },
            { Name => 'II.06 - The flood protection system has been required and it has failed',  SortOrder => 0 },
            { Name => 'II.91 - It has been necessary resort to alternative facilities and they have not worked according to expected plan',  SortOrder => 0 },
            { Name => 'II.92 - It has been necessary resort to alternative staff and they have not worked according to expected plan',  SortOrder => 0 },
            { Name => 'II.93 - It has been necessary resort to alternative equipment and it has not worked according to expected plan',  SortOrder => 0 },
            { Name => 'II.94 - It has been necessary resort to alternative channels and they have not worked according to expected plan',  SortOrder => 0 },
            { Name => 'II.95 - It has been necessary resort to alternative services and they have not worked according to expected plan',  SortOrder => 0 },
            { Name => 'II.96 - It has been necessary to activate the alternative means and they have not worked according to the expected plan',  SortOrder => 0 },
            { Name => 'II.99 - No incidences',  SortOrder => 0 },
        ],
    },
    
    
    {
        Name        => 'Synchronized',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'Freeform',
        MaxValues	=> 1,
        Disabled    => 0,
        Description => 'If the ticket is synchronized. Set at creation',
    },
    {
        Name        => 'Sync ID',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'Freeform',
        MaxValues	=> 1,
        Disabled    => 0,
        Description => 'Ticket ID in the sync RT',
    },
    {
        Name        => 'Sync RT',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'Freeform',
        MaxValues	=> 1,
        Disabled    => 0,
        Description => 'Sync RT',
    },
    {
        Name        => 'Sync Owner',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'Freeform',
        MaxValues	=> 1,
        Disabled    => 0,
        Description => 'Ticket Owner in the sync RT',
    },
    {
        Name        => 'Sync Constituency',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'Freeform',
        MaxValues	=> 1,
        Disabled    => 0,
        Description => 'Ticket Constituency in the sync RT',
    },
    {
        Name        => 'Reminders',
        LookupType  => 'RT::Queue-RT::Ticket',
        Queue       => 'Incidents',
        Type        => 'Freeform',
        MaxValues	=> 1,
        Disabled    => 0,
        Description => 'Number of reminders sent by RT',
    },
);

@Users = (
    {
        Name        => 'rest',
        Password    => 'LuC14R3stUs3rP4ss',
        RealName	=> 'REST user',
        Timezone    => 'Europe/Madrid',
        Privileged  => 1,
        Disabled    => 0,
    },
    {
        Name        => 'rtcronuser',
        Password    => '',
        RealName	=> 'RT cron user',
        Timezone    => 'Europe/Madrid',
        Gecos		=> 'rtcronuser',
        Privileged  => 1,
        Disabled    => 0,
    }
);

@Groups = (
    {
        Name        => 'LUCIA_System',
        Members     => { Users =>  [ qw/ rest rtcronuser / ]},
    },
);

@ScripActions = (
    {  Name        => '[Lucia] SetFinalPriority', # loc
       Description => 'Set FinalPriority with the same value as Priority' , # loc
       ExecModule  => 'Lucia_SetFinalPriority',
    },
    {  Name        => '[Lucia] SetDueDate', # loc
       Description => 'Set DueDate according to Priority value' , # loc
       ExecModule  => 'Lucia_SetDueDate',
    },
    {  Name        => '[Lucia] SetSituation', # loc
       Description => 'Change default SetSituation on any activity on the ticket' , # loc
       ExecModule  => 'Lucia_SetSituation',
    },
    {  Name        => '[Lucia] CheckConstituency', # loc
       Description => 'Allows/Prevents constituency change' , # loc
       ExecModule  => 'Lucia_CheckConstituency',
    },    
    {  Name        => '[Lucia] SetReminders', # loc
       Description => 'Set Reminders value to 1' , # loc
       ExecModule  => 'Lucia_SetReminders',
    },
    {  Name        => '[Lucia] SendNotification', # loc
       Description => 'Send create notification to external organizations' , # loc
       ExecModule  => 'Lucia_SendNotification',
    },
    {  Name        => '[Lucia] StoreSyncRequest', # loc
       Description => 'Store a synchronization request after ticket edition/creation/comment/correspond' , # loc
       ExecModule  => 'Lucia_StoreSyncRequest',
    },
);

@ScripConditions = (
    {  Name        => '[Lucia] On Priority edition', # loc
       Description => 'On priority edition (either create, reopen or edition)' , # loc
       ApplicableTransTypes => 'Create,Set,Status',
       ExecModule  => 'Lucia_PriorityEdition',
    },
    {  Name        => '[Lucia] On any activity', # loc
       Description => 'On any activity (edition, comment, correspond, status change) of the ticket' , # loc
       ApplicableTransTypes => 'CustomField,Comment,Correspond,Set,Status',
       ExecModule  => 'Lucia_AnyActivity',
    },
    {  Name        => '[Lucia] On any edition', # loc
       Description => 'On any edition (edition, status change) of the ticket' , # loc
       ApplicableTransTypes => 'CustomField,Set,Status',
       ExecModule  => 'Lucia_AnyEdition',
    },
    {  Name        => '[Lucia] CheckReminder', # loc
       Description => 'Check if is time to send a reminder' , # loc
       ExecModule  => 'Lucia_CheckReminder',
    },
    {  Name        => '[Lucia] CreateINCIDENTTicket', # loc
       Description => 'On creating a INCIDENT ticket' , # loc
       ApplicableTransTypes => 'Create',
       ExecModule  => 'Lucia_CreateINCIDENTTicket',
    },
    {  Name        => '[Lucia] CreateSATINETTicket', # loc
       Description => 'On creating a SATINET ticket' , # loc
       ApplicableTransTypes => 'Create',
       ExecModule  => 'Lucia_CreateSATINETTicket',
    },
    {  Name        => '[Lucia] CreateSATSARATicket', # loc
       Description => 'On creating a SATSARA ticket' , # loc
       ApplicableTransTypes => 'Create',
       ExecModule  => 'Lucia_CreateSATSARATicket',
    },
    {  Name        => '[Lucia] ReopenINCIDENTTicket', # loc
       Description => 'On reopening a INCIDENT ticket' , # loc
       ApplicableTransTypes => 'Set,Status',
       ExecModule  => 'Lucia_ReopenINCIDENTTicket',
    },
    {  Name        => '[Lucia] ReopenSATINETTicket', # loc
       Description => 'On reopening a SATINET ticket' , # loc
       ApplicableTransTypes => 'Set,Status',
       ExecModule  => 'Lucia_ReopenSATINETTicket',
    },
    {  Name        => '[Lucia] ReopenSATSARATicket', # loc
       Description => 'On reopening a SATSARA ticket' , # loc
       ApplicableTransTypes => 'Set,Status',
       ExecModule  => 'Lucia_ReopenSATSARATicket',
    },
    {  Name        => '[Lucia] CommentINCIDENTTicket', # loc
       Description => 'On commenting a INCIDENT ticket' , # loc
       ApplicableTransTypes => 'Comment,Correspond',
       ExecModule  => 'Lucia_CommentINCIDENTTicket',
    },
    {  Name        => '[Lucia] CommentSATINETTicket', # loc
       Description => 'On commenting a SATINET ticket' , # loc
       ApplicableTransTypes => 'Comment,Correspond',
       ExecModule  => 'Lucia_CommentSATINETTicket',
    },
    {  Name        => '[Lucia] CommentSATSARATicket', # loc
       Description => 'On commenting a SATSARA ticket' , # loc
       ApplicableTransTypes => 'Comment,Correspond',
       ExecModule  => 'Lucia_CommentSATSARATicket',
    },
    {  Name        => '[Lucia] CloseINCIDENTTicket', # loc
       Description => 'On closing a INCIDENT ticket' , # loc
       ApplicableTransTypes => 'Set,Status',
       ExecModule  => 'Lucia_CloseINCIDENTTicket',
    },
    {  Name        => '[Lucia] CloseSATINETTicket', # loc
       Description => 'On closing a SATINET ticket' , # loc
       ApplicableTransTypes => 'Set,Status',
       ExecModule  => 'Lucia_CloseSATINETTicket',
    },
    {  Name        => '[Lucia] CloseSATSARATicket', # loc
       Description => 'On closing a SATSARA ticket' , # loc
       ApplicableTransTypes => 'Set,Status',
       ExecModule  => 'Lucia_CloseSATSARATicket',
    },
    {  Name        => '[Lucia] AutoCloseINCIDENTTicket', # loc
       Description => 'On closing a INCIDENT ticket' , # loc
       ApplicableTransTypes => 'Set,Status',
       ExecModule  => 'Lucia_AutoCloseINCIDENTTicket',
    },
    {  Name        => '[Lucia] AutoCloseSATINETTicket', # loc
       Description => 'On closing a SATINET ticket' , # loc
       ApplicableTransTypes => 'Set,Status',
       ExecModule  => 'Lucia_AutoCloseSATINETTicket',
    },
    {  Name        => '[Lucia] AutoCloseSATSARATicket', # loc
       Description => 'On auto closing a SATSARA ticket' , # loc
       ApplicableTransTypes => 'Set,Status',
       ExecModule  => 'Lucia_AutoCloseSATSARATicket',
    },
);

@Templates = (
	{  Queue       => '0',
       Name        => 'AutoReply IR in HTML',                     # loc
       Description => 'HTML IR Autoresponse template',    # loc
       Content     => <<'EOTEXT'
Subject: [AutoReply] {$Ticket->Subject}
Content-Type: text/html
From: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>
Reply-To: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>

<p style="font-size:10pt;font-style:italic;">[English version below]</p>

<p>Estimado Sr./Sra.,</p>

<p>Este mensaje se ha generado automáticamente como respuesta a la creación de un ticket recibido relativo a: "<b>{$Ticket->Subject()}</b>".</p>

<p>Se le ha asignado la referencia <b>{$Ticket->SubjectTag}</b>. Por favor, inclúyala en la línea 'Asunto' de todos los mensajes relacionados con esta comunicación.</p>

<p>Gracias por la información. Si desea hacernos cualquier tipo de comentario o pregunta, o si necesita ayuda adicional, no dude en contactar con nosotros.</p>

<p>
Atentamente,<br/>
{RT->Config->Get('LuciaInstanceName')}<br/>
</p>

<hr/>

<p>Dear Mr./Ms.,</p>

<p>This message has been automatically generated in response to the creation of a ticket regarding: "<b>{$Ticket->Subject()}</b>".</p>

<p>It has been assigned the reference number <b>{$Ticket->SubjectTag}</b>. Please, include this reference in the 'Subject' line of any further messages dealing with this notification.</p>

<p>Thank you for reporting it. If you have any comments or questions, or if we can be of additional assistance, please let us know.</p>

<p>
Best Regards,<br/>
{RT->Config->Get('LuciaInstanceName')}<br/>
</p>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'AutoReply INV in HTML',                     # loc
       Description => 'HTML INV Autoresponse template',    # loc
       Content     => <<'EOTEXT'
Subject: {$Ticket->Subject}
Content-Type: text/html
RT-Attach-Message: yes
From: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>
Reply-To: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>

<p>{$Transaction->Content(Type =>'text/html')}</p>

<p>
{RT->Config->Get('LuciaInstanceName')}
</p>

EOTEXT
    },
    {  Queue       => '0',
       Name        => 'Resolved INV/IR in HTML',                     # loc
       Description => 'HTML INV/IR Ticket Resolved',    # loc
       Content     => <<'EOTEXT'
Subject: [Resolved] {$Ticket->Subject}
Content-Type: text/html
RT-Attach-Message: yes
From: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>
Reply-To: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>

<p style="font-size:10pt;font-style:italic;">[English version below]</p>

<p>Estimado Sr./Sra.,</p>

<p>El ticket <b>{$Ticket->SubjectTag} {$Ticket->Subject}</b> ha sido cerrado.</p>

<p>Si desea reabrirlo o tiene cualquier comentario sobre el mismo, póngase en contacto con nosotros incluyendo esta referencia <b>{$Ticket->SubjectTag}</b> en el asunto.</p>

<p>
Atentamente,<br/>
{RT->Config->Get('LuciaInstanceName')}<br/>
</p>

<hr/>

<p>Dear Mr./Ms.,</p>

<p>The ticket <b>{$Ticket->SubjectTag} {$Ticket->Subject}</b> has been closed.</p>

<p>If you want to reopen it, please contact us including this string <b>{$Ticket->SubjectTag}</b> in the subject line for all future correspondence about this issue.</p>

<p>
Best Regards,<br/>
{RT->Config->Get('LuciaInstanceName')}<br/>
</p>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Autoreply INCIDENT INC in HTML',                     # loc
       Description => 'HTML autoreply INCIDENT INC template',    # loc
       Content     => <<'EOTEXT'
Subject: [INC] {$Ticket->Subject}
Content-Type: text/html
From: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>
Reply-To: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>

<p style="font-size:10pt;">
<b>NUEVO INCIDENTE</b><br/>
<b>Creado por: </b>{$Transaction->CreatorObj->Name}<br/>
<b>Clasificación del incidente: </b>
{
  $clas = $Ticket->FirstCustomFieldValue('Cyber Incident Classification');
  if($clas eq 'Malware'){ 
    $pic = 'Código dañino'; 
  }
  if($clas eq 'Information compromised'){ 
    $pic = 'Compromiso de información'; 
  }
  if($clas eq 'Abusive content'){ 
    $pic = 'Contenido abusivo'; 
  }
  if($clas eq 'Availability'){ 
    $pic = 'Disponibilidad'; 
  }
  if($clas eq 'Fraud'){ 
    $pic = 'Fraude'; 
  }
  if($clas eq 'Intrusions'){ 
    $pic = 'Intrusiones'; 
  }
  if($clas eq 'Security policy'){ 
    $pic = 'Política de seguridad'; 
  }
  if($clas eq 'Information gathering'){ 
    $pic = 'Obtención de información'; 
  }
  if($clas eq 'Test'){ 
    $pic = 'Test'; 
  }
  if($clas eq 'Others'){ 
    $pic = 'Otros'; 
  }
  $pic;
}<br/>
<b>Peligrosidad: </b>
{
  $pas = $Ticket->PriorityAsString;
  if($pas eq '(no value)'){ 
    $p = '(sin valor)'; 
  }
  if($pas eq 'Low'){ 
    $p = 'Baja'; 
  }
  if($pas eq 'Medium'){ 
    $p = 'Media'; 
  }
  if($pas eq 'High'){
    $p =  'Alta';
  }
  if($pas eq 'Very high'){
    $p =  'Muy alta';
  }
  if($pas eq 'Critical'){
    $p =  'Crítica';
  }
  $p;
}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
{
  my $text;
  my $contador;
  my $children = RT::Tickets->new( $RT::SystemUser );
  $children->FromSQL( RT::IR->Query(
	Queue    => 'Incident Reports',
    MemberOf => $Ticket,
  ));
  $text .= "<br/><b>Reportes de Incidentes (IR) relacionados:</b>";
  $contador = 0;
  while (my $t = $children->Next) {
    $contador++;
	$text .= "<br/> > <a href=" . RT->Config->Get("WebURL") . "Ticket/Display.html?id=" . $t->id . ">[" . RT->Config->Get('LuciaInstanceName') . " #" . $t->id . "]</a>" . " " . $t->Subject;
  }
  if ($contador == 0){$text .= "<br/> <i>(Ninguno)</i>"};
  $text .= "<br/>";
  $children = RT::Tickets->new( $RT::SystemUser );
  $children->FromSQL( RT::IR->Query(
    Queue    => 'Investigations',
    MemberOf => $Ticket,
  ));
  $text .= "<br/><b>Investigaciones (INV) relacionadas:</b>";
  $contador = 0;
  while (my $t = $children->Next) {
    $contador++;
	$text .= "<br/> > <a href=" . RT->Config->Get("WebURL") . "Ticket/Display.html?id=" . $t->id . ">[" . RT->Config->Get('LuciaInstanceName') . " #" . $t->id . "]</a>" . " " . $t->Subject;
  }
  if ($contador == 0){$text .= "<br/> <i>(Ninguna)</i>"};
  $text .= "<br/>";
}
</p>

<hr/>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Autoreply INCIDENT INV/IR in HTML',                     # loc
       Description => 'HTML autoreply INCIDENT INV/IR template',    # loc
       Content     => <<'EOTEXT'
Subject: [IR-INV] {$Ticket->Subject}
Content-Type: text/html
RT-Attach-Message: yes
From: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>
Reply-To: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>

<p style="font-size:10pt;">
<b>NUEVO REPORTE DE INCIDENTE / INVESTIGACIÓN </b><br/>
<b>Mensaje enviado por: </b>{$Transaction->CreatorObj->Name}<br/>
<b>Corresponsales: </b>{$Ticket->RequestorAddresses}<br/>
<b>CC: </b>{$Ticket->CcAddresses}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
{
   my $text;
   my $contador;
   my $children = RT::Tickets->new( $RT::SystemUser );
   $children->FromSQL( RT::IR->Query(
     Queue    => 'Incidents',
     HasMember => $Ticket,
   ));
   $text .= "<br/><b>Incidentes (INC) relacionados:</b>";
   $contador = 0;
   while (my $t = $children->Next) {
     $contador++;
	 $text .= "<br/> > <a href=" . RT->Config->Get("WebURL") . "Ticket/Display.html?id=" . $t->id . ">[" . RT->Config->Get('LuciaInstanceName') . " #" . $t->id . "]</a>" . " " . $t->Subject;
   }
   if ($contador == 0){$text .= "<br/> <i>(Ninguno)</i>"};
   $text .= "<br/>";
}
</p>

<hr/>

<p>{$Transaction->Content(Type =>'text/html')}</p>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Autoreply SATINET in HTML',                     # loc
       Description => 'HTML autoreply SATINET template',    # loc
       Content     => <<'EOTEXT'
Subject: {$Ticket->Subject}
Content-Type: text/html
From: SAT-INET {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATINET'};}>
Reply-To: SAT-INET {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATINET'};}>

<p style="font-size:10pt;">
Estimado/a Sr/Sra.,<br/>
<br/>
Desde el Sistema de Alerta Temprana de las Sondas de Internet nos ponemos en contacto con el fin de informar sobre una alarma producida en nuestros sistemas.<br/>
<br/>
<b>Sonda: </b>{substr($Ticket->FirstCustomFieldValue('Constituency'),8)}<br/>
<b>Clasificación del incidente: </b>
{
  $clas = $Ticket->FirstCustomFieldValue('Cyber Incident Classification');
  if($clas eq 'Malware'){ 
    $pic = 'Código dañino'; 
  }
  if($clas eq 'Information compromised'){ 
    $pic = 'Compromiso de información'; 
  }
  if($clas eq 'Abusive content'){ 
    $pic = 'Contenido abusivo'; 
  }
  if($clas eq 'Availability'){ 
    $pic = 'Disponibilidad'; 
  }
  if($clas eq 'Fraud'){ 
    $pic = 'Fraude'; 
  }
  if($clas eq 'Intrusions'){ 
    $pic = 'Intrusiones'; 
  }
  if($clas eq 'Security policy'){ 
    $pic = 'Política de seguridad'; 
  }
  if($clas eq 'Information gathering'){ 
    $pic = 'Obtención de información'; 
  }
  if($clas eq 'Test'){ 
    $pic = 'Test'; 
  }
  if($clas eq 'Others'){ 
    $pic = 'Otros'; 
  }
  $pic;
}<br/>
<b>Peligrosidad: </b>
{
  $pas = $Ticket->PriorityAsString;
  if($pas eq '(no value)'){ 
    $p = '(sin valor)'; 
  }
  if($pas eq 'Low'){ 
    $p = 'Baja'; 
  }
  if($pas eq 'Medium'){ 
    $p = 'Media'; 
  }
  if($pas eq 'High'){
    $p =  'Alta';
  }
  if($pas eq 'Very high'){
    $p =  'Muy alta';
  }
  if($pas eq 'Critical'){
    $p =  'Crítica';
  }
  $p;
}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
<br/>
Atentamente,<br/>
Equipo SAT-INET CCN-CERT<br/>
Centro Criptológico Nacional
</p>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Autoreply SATSARA in HTML',                     # loc
       Description => 'HTML autoreply SATSARA template',    # loc
       Content     => <<'EOTEXT'
Subject: {$Ticket->Subject}
Content-Type: text/html
From: SAT-SARA {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATSARA'};}>
Reply-To: SAT-SARA {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATSARA'};}>

<p style="font-size:10pt;">
Estimado/a Sr/Sra.,<br/>
<br/>
Desde el Sistema de Alerta Temprana de la Red SARA nos ponemos en contacto con el fin de informar sobre una alarma producida en nuestros sistemas.<br/>
<br/>
<b>Sonda: </b>{substr($Ticket->FirstCustomFieldValue('Constituency'),8)}<br/>
<b>Clasificación del incidente: </b>
{
  $clas = $Ticket->FirstCustomFieldValue('Cyber Incident Classification');
  if($clas eq 'Malware'){ 
    $pic = 'Código dañino'; 
  }
  if($clas eq 'Information compromised'){ 
    $pic = 'Compromiso de información'; 
  }
  if($clas eq 'Abusive content'){ 
    $pic = 'Contenido abusivo'; 
  }
  if($clas eq 'Availability'){ 
    $pic = 'Disponibilidad'; 
  }
  if($clas eq 'Fraud'){ 
    $pic = 'Fraude'; 
  }
  if($clas eq 'Intrusions'){ 
    $pic = 'Intrusiones'; 
  }
  if($clas eq 'Security policy'){ 
    $pic = 'Política de seguridad'; 
  }
  if($clas eq 'Information gathering'){ 
    $pic = 'Obtención de información'; 
  }
  if($clas eq 'Test'){ 
    $pic = 'Test'; 
  }
  if($clas eq 'Others'){ 
    $pic = 'Otros'; 
  }
  $pic;
}<br/>
<b>Peligrosidad: </b>
{
  $pas = $Ticket->PriorityAsString;
  if($pas eq '(no value)'){ 
    $p = '(sin valor)'; 
  }
  if($pas eq 'Low'){ 
    $p = 'Baja'; 
  }
  if($pas eq 'Medium'){ 
    $p = 'Media'; 
  }
  if($pas eq 'High'){
    $p =  'Alta';
  }
  if($pas eq 'Very high'){
    $p =  'Muy alta';
  }
  if($pas eq 'Critical'){
    $p =  'Crítica';
  }
  $p;
}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
<br/>
Atentamente,<br/>
Equipo SAT-SARA CCN-CERT<br/>
Centro Criptológico Nacional
</p>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Autoreply Reopen INCIDENT in HTML',                     # loc
       Description => 'HTML autoreply Reopen INCIDENT template',    # loc
       Content     => <<'EOTEXT'
Subject: [ReOpen] {$Ticket->Subject}
Content-Type: text/html
From: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>
Reply-To: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>

<p style="font-size:10pt;">
<b>REAPERTURA DE TICKET</b><br/>
<b>Antigüedad: </b> {substr($Ticket->Created,0,10)}<br/>
<b>Solicitada por: </b>{$Transaction->CreatorObj->Name}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
{
   my $text;
   my $contador;
   my $children = RT::Tickets->new( $RT::SystemUser );
   $children->FromSQL( RT::IR->Query(
     Queue    => 'Incidents',
     HasMember => $Ticket,
   ));
   $text .= "<br/><b>Incidentes (INC) relacionados:</b>";
   $contador = 0;
   while (my $t = $children->Next) {
     $contador++;
	 $text .= "<br/> > <a href=" . RT->Config->Get("WebURL") . "Ticket/Display.html?id=" . $t->id . ">[" . RT->Config->Get('LuciaInstanceName') . " #" . $t->id . "]</a>" . " " . $t->Subject;
   }
   if ($contador == 0){$text .= "<br/> <i>(Ninguno)</i>"};
   $text .= "<br/>";
   $children = RT::Tickets->new( $RT::SystemUser );
   $children->FromSQL( RT::IR->Query(
	 Queue    => 'Incident Reports',
     MemberOf => $Ticket,
   ));
   $text .= "<br/><b>Reportes de Incidentes (IR) relacionados:</b>";
   $contador = 0;
   while (my $t = $children->Next) {
     $contador++;
	 $text .= "<br/> > <a href=" . RT->Config->Get("WebURL") . "Ticket/Display.html?id=" . $t->id . ">[" . RT->Config->Get('LuciaInstanceName') . " #" . $t->id . "]</a>" . " " . $t->Subject;
   }
   if ($contador == 0){$text .= "<br/> <i>(Ninguno)</i>"};
   $text .= "<br/>";
   $children = RT::Tickets->new( $RT::SystemUser );
   $children->FromSQL( RT::IR->Query(
     Queue    => 'Investigations',
     MemberOf => $Ticket,
   ));
   $text .= "<br/><b>Investigaciones (INV) relacionadas:</b>";
   $contador = 0;
   while (my $t = $children->Next) {
     $contador++;
	 $text .= "<br/> > <a href=" . RT->Config->Get("WebURL") . "Ticket/Display.html?id=" . $t->id . ">[" . RT->Config->Get('LuciaInstanceName') . " #" . $t->id . "]</a>" . " " . $t->Subject;
   }
   if ($contador == 0){$text .= "<br/> <i>(Ninguna)</i>"};
   $text .= "<br/>";
}
</p>

<hr/>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Autoreply Reopen SATINET in HTML',                     # loc
       Description => 'HTML autoreply Reopen SATINET template',    # loc
       Content     => <<'EOTEXT'
Subject: [ReOpen] {$Ticket->Subject}
Content-Type: text/html
From: SAT-INET {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATINET'};}>
Reply-To: SAT-INET {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATINET'};}>

<p style="font-size:10pt;">
<b>REAPERTURA SAT-INET</b><br/>
<b>Sonda: </b>{substr($Ticket->FirstCustomFieldValue('Constituency'),8)}<br/>
<b>Antigüedad: </b> {substr($Ticket->Created,0,10)}<br/>
<b>Solicitada por: </b>{$Transaction->CreatorObj->Name}<br/>
<b>Clasificación del incidente: </b>
{
  $clas = $Ticket->FirstCustomFieldValue('Cyber Incident Classification');
  if($clas eq 'Malware'){ 
    $pic = 'Código dañino'; 
  }
  if($clas eq 'Information compromised'){ 
    $pic = 'Compromiso de información'; 
  }
  if($clas eq 'Abusive content'){ 
    $pic = 'Contenido abusivo'; 
  }
  if($clas eq 'Availability'){ 
    $pic = 'Disponibilidad'; 
  }
  if($clas eq 'Fraud'){ 
    $pic = 'Fraude'; 
  }
  if($clas eq 'Intrusions'){ 
    $pic = 'Intrusiones'; 
  }
  if($clas eq 'Security policy'){ 
    $pic = 'Política de seguridad'; 
  }
  if($clas eq 'Information gathering'){ 
    $pic = 'Obtención de información'; 
  }
  if($clas eq 'Test'){ 
    $pic = 'Test'; 
  }
  if($clas eq 'Others'){ 
    $pic = 'Otros'; 
  }
  $pic;
}<br/>
<b>Peligrosidad: </b>
{
  $pas = $Ticket->PriorityAsString;
  if($pas eq '(no value)'){ 
    $p = '(sin valor)'; 
  }
  if($pas eq 'Low'){ 
    $p = 'Baja'; 
  }
  if($pas eq 'Medium'){ 
    $p = 'Media'; 
  }
  if($pas eq 'High'){
    $p =  'Alta';
  }
  if($pas eq 'Very high'){
    $p =  'Muy alta';
  }
  if($pas eq 'Critical'){
    $p =  'Crítica';
  }
  $p;
}<br/>
<b>Resolución del incidente: </b>
{
  $res = $Ticket->FirstCustomFieldValue('Resolution');
  if($res eq 'No impact'){ 
    $p = 'Sin impacto'; 
  }
  if($res eq 'False positive'){ 
    $p = 'Falso positivo'; 
  }
  if($res eq 'No answer'){ 
    $p = 'Sin respuesta';
  }
  if($res eq 'Security incident'){
    $p =  'Incidente de seguridad';
  }
  if($res eq 'Lack of information'){
    $p =  'Falta información';
  }
  $p;
}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
</p>

<hr/>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Autoreply Reopen SATSARA in HTML',                     # loc
       Description => 'HTML autoreply Reopen SATSARA template',    # loc
       Content     => <<'EOTEXT'
Subject: [ReOpen] {$Ticket->Subject}
Content-Type: text/html
From: SAT-SARA {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATSARA'};}>
Reply-To: SAT-SARA {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATSARA'};}>

<p style="font-size:10pt;">
<b>REAPERTURA SAT-SARA</b><br/>
<b>Sonda: </b>{substr($Ticket->FirstCustomFieldValue('Constituency'),8)}<br/>
<b>Antigüedad: </b> {substr($Ticket->Created,0,10)}<br/>
<b>Solicitada por: </b>{$Transaction->CreatorObj->Name}<br/>
<b>Clasificación del incidente: </b>
{
  $clas = $Ticket->FirstCustomFieldValue('Cyber Incident Classification');
  if($clas eq 'Malware'){ 
    $pic = 'Código dañino'; 
  }
  if($clas eq 'Information compromised'){ 
    $pic = 'Compromiso de información'; 
  }
  if($clas eq 'Abusive content'){ 
    $pic = 'Contenido abusivo'; 
  }
  if($clas eq 'Availability'){ 
    $pic = 'Disponibilidad'; 
  }
  if($clas eq 'Fraud'){ 
    $pic = 'Fraude'; 
  }
  if($clas eq 'Intrusions'){ 
    $pic = 'Intrusiones'; 
  }
  if($clas eq 'Security policy'){ 
    $pic = 'Política de seguridad'; 
  }
  if($clas eq 'Information gathering'){ 
    $pic = 'Obtención de información'; 
  }
  if($clas eq 'Test'){ 
    $pic = 'Test'; 
  }
  if($clas eq 'Others'){ 
    $pic = 'Otros'; 
  }
  $pic;
}<br/>
<b>Peligrosidad: </b>
{
  $pas = $Ticket->PriorityAsString;
  if($pas eq '(no value)'){ 
    $p = '(sin valor)'; 
  }
  if($pas eq 'Low'){ 
    $p = 'Baja'; 
  }
  if($pas eq 'Medium'){ 
    $p = 'Media'; 
  }
  if($pas eq 'High'){
    $p =  'Alta';
  }
  if($pas eq 'Very high'){
    $p =  'Muy alta';
  }
  if($pas eq 'Critical'){
    $p =  'Crítica';
  }
  $p;
}<br/>
<b>Resolución del incidente: </b>
{
  $res = $Ticket->FirstCustomFieldValue('Resolution');
  if($res eq 'No impact'){ 
    $p = 'Sin impacto'; 
  }
  if($res eq 'False positive'){ 
    $p = 'Falso positivo'; 
  }
  if($res eq 'No answer'){ 
    $p = 'Sin respuesta';
  }
  if($res eq 'Security incident'){
    $p =  'Incidente de seguridad';
  }
  if($res eq 'Lack of information'){
    $p =  'Falta información';
  }
  $p;
}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
</p>

<hr/>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Commented INCIDENT INC in HTML',                     # loc
       Description => 'HTML INCIDENT INC comment template',    # loc
       Content     => <<'EOTEXT'
Subject: [INC] Re: {my $s=($Transaction->Subject||$Ticket->Subject||""); $s =~ s/\[INC\]\s*//g; $s =~ s/^Re:\s*//i; $s;}
Content-Type: text/html
From: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>
Reply-To: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>

<p style="font-size:10pt;">
<b>COMENTARIO DE INCIDENTE</b><br/>
<b>Antigüedad: </b> {substr($Ticket->Created,0,10)}<br/>
<b>Vencimiento: </b> {substr($Ticket->Due,0,10)}<br/>
<b>Comentado por: </b>{$Transaction->CreatorObj->Name}<br/>
<b>Clasificación del incidente: </b>
{
  $clas = $Ticket->FirstCustomFieldValue('Cyber Incident Classification');
  if($clas eq 'Malware'){ 
    $pic = 'Código dañino'; 
  }
  if($clas eq 'Information compromised'){ 
    $pic = 'Compromiso de información'; 
  }
  if($clas eq 'Abusive content'){ 
    $pic = 'Contenido abusivo'; 
  }
  if($clas eq 'Availability'){ 
    $pic = 'Disponibilidad'; 
  }
  if($clas eq 'Fraud'){ 
    $pic = 'Fraude'; 
  }
  if($clas eq 'Intrusions'){ 
    $pic = 'Intrusiones'; 
  }
  if($clas eq 'Security policy'){ 
    $pic = 'Política de seguridad'; 
  }
  if($clas eq 'Information gathering'){ 
    $pic = 'Obtención de información'; 
  }
  if($clas eq 'Test'){ 
    $pic = 'Test'; 
  }
  if($clas eq 'Others'){ 
    $pic = 'Otros'; 
  }
  $pic;
}<br/>
<b>Peligrosidad: </b>
{
  $pas = $Ticket->PriorityAsString;
  if($pas eq '(no value)'){ 
    $p = '(sin valor)'; 
  }
  if($pas eq 'Low'){ 
    $p = 'Baja'; 
  }
  if($pas eq 'Medium'){ 
    $p = 'Media'; 
  }
  if($pas eq 'High'){
    $p =  'Alta';
  }
  if($pas eq 'Very high'){
    $p =  'Muy alta';
  }
  if($pas eq 'Critical'){
    $p =  'Crítica';
  }
  $p;
}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
{
  my $text;
  my $contador;
  my $children = RT::Tickets->new( $RT::SystemUser );
  $children->FromSQL( RT::IR->Query(
	Queue    => 'Incident Reports',
    MemberOf => $Ticket,
  ));
  $text .= "<br/><b>Reportes de Incidentes (IR) relacionados:</b>";
  $contador = 0;
  while (my $t = $children->Next) {
    $contador++;
	$text .= "<br/> > <a href=" . RT->Config->Get("WebURL") . "Ticket/Display.html?id=" . $t->id . ">[" . RT->Config->Get('LuciaInstanceName') . " #" . $t->id . "]</a>" . " " . $t->Subject;
  }
  if ($contador == 0){$text .= "<br/> <i>(Ninguno)</i>"};
  $text .= "<br/>";
  $children = RT::Tickets->new( $RT::SystemUser );
  $children->FromSQL( RT::IR->Query(
    Queue    => 'Investigations',
    MemberOf => $Ticket,
  ));
  $text .= "<br/><b>Investigaciones (INV) relacionadas:</b>";
  $contador = 0;
  while (my $t = $children->Next) {
    $contador++;
	$text .= "<br/> > <a href=" . RT->Config->Get("WebURL") . "Ticket/Display.html?id=" . $t->id . ">[" . RT->Config->Get('LuciaInstanceName') . " #" . $t->id . "]</a>" . " " . $t->Subject;
  }
  if ($contador == 0){$text .= "<br/> <i>(Ninguna)</i>"};
  $text .= "<br/>";
}
</p>

<hr/>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Commented INCIDENT INV/IR in HTML',                     # loc
       Description => 'HTML INCIDENT INV/IR comment template',    # loc
       Content     => <<'EOTEXT'
Subject: [IR-INV] Re: {my $s=($Transaction->Subject||$Ticket->Subject||""); $s =~ s/\[IR-INV\]\s*//g; $s =~ s/^Re:\s*//i; $s;}
Content-Type: text/html
RT-Attach-Message: yes
From: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>
Reply-To: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>

<p style="font-size:10pt;">
<b>COMENTARIO DE REPORTE DE INCIDENTE / INVESTIGACIÓN </b><br/>
<b>Antigüedad: </b> {substr($Ticket->Created,0,10)}<br/>
<b>Mensaje enviado por: </b>{$Transaction->CreatorObj->Name}<br/>
<b>Corresponsales: </b>{join( ", ", @{$Transaction->{'scrips'}{'items'}[2]{'ScripActionObj'}{'Action'}{'To'}} );}<br/>
<b>CC: </b>{join( ", ", @{$Transaction->{'scrips'}{'items'}[2]{'ScripActionObj'}{'Action'}{'Cc'}} );}<br/>
<b>CC (solo esta vez): </b>{${$Transaction->Addresses->{'RT-Send-Cc'}[0][4][0]};}<br/>
<b>BCC (solo esta vez): </b>{${$Transaction->Addresses->{'RT-Send-Bcc'}[0][4][0]};}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
{
   my $text;
   my $contador;
   my $children = RT::Tickets->new( $RT::SystemUser );
   $children->FromSQL( RT::IR->Query(
     Queue    => 'Incidents',
     HasMember => $Ticket,
   ));
   $text .= "<br/><b>Incidentes (INC) relacionados:</b>";
   $contador = 0;
   while (my $t = $children->Next) {
     $contador++;
	 $text .= "<br/> > <a href=" . RT->Config->Get("WebURL") . "Ticket/Display.html?id=" . $t->id . ">[" . RT->Config->Get('LuciaInstanceName') . " #" . $t->id . "]</a>" . " " . $t->Subject;
   }
   if ($contador == 0){$text .= "<br/> <i>(Ninguno)</i>"};
   $text .= "<br/>";
}
</p>

<hr/>

<p>{$Transaction->Content(Type =>'text/html')}</p>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Commented SATINET in HTML',                     # loc
       Description => 'HTML SATINET comment template',    # loc
       Content     => <<'EOTEXT'
Subject: Re: {my $s=($Transaction->Subject||$Ticket->Subject||""); $s =~ s/^Re:\s*//i; $s;}
Content-Type: text/html
From: SAT-INET {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATINET'};}>
Reply-To: SAT-INET {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATINET'};}>

<p style="font-size:10pt;">
<b>COMENTARIO SAT-INET</b><br/>
<b>Sonda: </b>{substr($Ticket->FirstCustomFieldValue('Constituency'),8)}<br/>
<b>Antigüedad: </b> {substr($Ticket->Created,0,10)}<br/>
<b>Vencimiento: </b> {substr($Ticket->Due,0,10)}<br/>
<b>Comentado por: </b>{$Transaction->CreatorObj->Name}<br/>
<b>Clasificación del incidente: </b>
{
  $clas = $Ticket->FirstCustomFieldValue('Cyber Incident Classification');
  if($clas eq 'Malware'){ 
    $pic = 'Código dañino'; 
  }
  if($clas eq 'Information compromised'){ 
    $pic = 'Compromiso de información'; 
  }
  if($clas eq 'Abusive content'){ 
    $pic = 'Contenido abusivo'; 
  }
  if($clas eq 'Availability'){ 
    $pic = 'Disponibilidad'; 
  }
  if($clas eq 'Fraud'){ 
    $pic = 'Fraude'; 
  }
  if($clas eq 'Intrusions'){ 
    $pic = 'Intrusiones'; 
  }
  if($clas eq 'Security policy'){ 
    $pic = 'Política de seguridad'; 
  }
  if($clas eq 'Information gathering'){ 
    $pic = 'Obtención de información'; 
  }
  if($clas eq 'Test'){ 
    $pic = 'Test'; 
  }
  if($clas eq 'Others'){ 
    $pic = 'Otros'; 
  }
  $pic;
}<br/>
<b>Peligrosidad: </b>
{
  $pas = $Ticket->PriorityAsString;
  if($pas eq '(no value)'){ 
    $p = '(sin valor)'; 
  }
  if($pas eq 'Low'){ 
    $p = 'Baja'; 
  }
  if($pas eq 'Medium'){ 
    $p = 'Media'; 
  }
  if($pas eq 'High'){
    $p =  'Alta';
  }
  if($pas eq 'Very high'){
    $p =  'Muy alta';
  }
  if($pas eq 'Critical'){
    $p =  'Crítica';
  }
  $p;
}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
</p>

<hr/>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Commented SATSARA in HTML',                     # loc
       Description => 'HTML SATSARA comment template',    # loc
       Content     => <<'EOTEXT'
Subject: Re: {my $s=($Transaction->Subject||$Ticket->Subject||""); $s =~ s/^Re:\s*//i; $s;}
Content-Type: text/html
From: SAT-SARA {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATSARA'};}>
Reply-To: SAT-SARA {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATSARA'};}>

<p style="font-size:10pt;">
<b>COMENTARIO SAT-SARA</b><br/>
<b>Sonda: </b>{substr($Ticket->FirstCustomFieldValue('Constituency'),8)}<br/>
<b>Antigüedad: </b> {substr($Ticket->Created,0,10)}<br/>
<b>Vencimiento: </b> {substr($Ticket->Due,0,10)}<br/>
<b>Comentado por: </b>{$Transaction->CreatorObj->Name}<br/>
<b>Clasificación del incidente: </b>
{
  $clas = $Ticket->FirstCustomFieldValue('Cyber Incident Classification');
  if($clas eq 'Malware'){ 
    $pic = 'Código dañino'; 
  }
  if($clas eq 'Information compromised'){ 
    $pic = 'Compromiso de información'; 
  }
  if($clas eq 'Abusive content'){ 
    $pic = 'Contenido abusivo'; 
  }
  if($clas eq 'Availability'){ 
    $pic = 'Disponibilidad'; 
  }
  if($clas eq 'Fraud'){ 
    $pic = 'Fraude'; 
  }
  if($clas eq 'Intrusions'){ 
    $pic = 'Intrusiones'; 
  }
  if($clas eq 'Security policy'){ 
    $pic = 'Política de seguridad'; 
  }
  if($clas eq 'Information gathering'){ 
    $pic = 'Obtención de información'; 
  }
  if($clas eq 'Test'){ 
    $pic = 'Test'; 
  }
  if($clas eq 'Others'){ 
    $pic = 'Otros'; 
  }
  $pic;
}<br/>
<b>Peligrosidad: </b>
{
  $pas = $Ticket->PriorityAsString;
  if($pas eq '(no value)'){ 
    $p = '(sin valor)'; 
  }
  if($pas eq 'Low'){ 
    $p = 'Baja'; 
  }
  if($pas eq 'Medium'){ 
    $p = 'Media'; 
  }
  if($pas eq 'High'){
    $p =  'Alta';
  }
  if($pas eq 'Very high'){
    $p =  'Muy alta';
  }
  if($pas eq 'Critical'){
    $p =  'Crítica';
  }
  $p;
}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
</p>

<hr/>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Resolved INCIDENT INC in HTML',                     # loc
       Description => 'HTML resolved INCIDENT INC template',    # loc
       Content     => <<'EOTEXT'
Subject: [INC] [Resolved] {$Ticket->Subject}
Content-Type: text/html
From: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>
Reply-To: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>

<p style="font-size:10pt;">
<b>RESOLUCION DE INCIDENTE</b><br/>
<b>Antigüedad: </b> {substr($Ticket->Created,0,10)}<br/>
<b>Vencimiento: </b> {substr($Ticket->Due,0,10)}<br/>
<b>Cerrado por: </b>{$Transaction->CreatorObj->Name}<br/>
<b>Clasificación del incidente: </b>
{
  $clas = $Ticket->FirstCustomFieldValue('Cyber Incident Classification');
  if($clas eq 'Malware'){ 
    $pic = 'Código dañino'; 
  }
  if($clas eq 'Information compromised'){ 
    $pic = 'Compromiso de información'; 
  }
  if($clas eq 'Abusive content'){ 
    $pic = 'Contenido abusivo'; 
  }
  if($clas eq 'Availability'){ 
    $pic = 'Disponibilidad'; 
  }
  if($clas eq 'Fraud'){ 
    $pic = 'Fraude'; 
  }
  if($clas eq 'Intrusions'){ 
    $pic = 'Intrusiones'; 
  }
  if($clas eq 'Security policy'){ 
    $pic = 'Política de seguridad'; 
  }
  if($clas eq 'Information gathering'){ 
    $pic = 'Obtención de información'; 
  }
  if($clas eq 'Test'){ 
    $pic = 'Test'; 
  }
  if($clas eq 'Others'){ 
    $pic = 'Otros'; 
  }
  $pic;
}<br/>
<b>Peligrosidad: </b>
{
  $pas = $Ticket->PriorityAsString;
  if($pas eq '(no value)'){ 
    $p = '(sin valor)'; 
  }
  if($pas eq 'Low'){ 
    $p = 'Baja'; 
  }
  if($pas eq 'Medium'){ 
    $p = 'Media'; 
  }
  if($pas eq 'High'){
    $p =  'Alta';
  }
  if($pas eq 'Very high'){
    $p =  'Muy alta';
  }
  if($pas eq 'Critical'){
    $p =  'Crítica';
  }
  $p;
}<br/>
<b>Resolución del incidente: </b>
{
  $res = $Ticket->FirstCustomFieldValue('Resolution');
  if($res eq 'No impact'){ 
    $p = 'Sin impacto'; 
  }
  if($res eq 'False positive'){ 
    $p = 'Falso positivo'; 
  }
  if($res eq 'No answer'){ 
    $p = 'Sin respuesta';
  }
  if($res eq 'Security incident'){
    $p =  'Incidente de seguridad';
  }
  if($res eq 'Lack of information'){
    $p =  'Falta información';
  }
  $p;
}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
{
  my $text;
  my $contador;
  my $children = RT::Tickets->new( $RT::SystemUser );
  $children->FromSQL( RT::IR->Query(
	Queue    => 'Incident Reports',
    MemberOf => $Ticket,
  ));
  $text .= "<br/><b>Reportes de Incidentes (IR) relacionados:</b>";
  $contador = 0;
  while (my $t = $children->Next) {
    $contador++;
	$text .= "<br/> > <a href=" . RT->Config->Get("WebURL") . "Ticket/Display.html?id=" . $t->id . ">[" . RT->Config->Get('LuciaInstanceName') . " #" . $t->id . "]</a>" . " " . $t->Subject;
  }
  if ($contador == 0){$text .= "<br/> <i>(Ninguno)</i>"};
  $text .= "<br/>";
  $children = RT::Tickets->new( $RT::SystemUser );
  $children->FromSQL( RT::IR->Query(
    Queue    => 'Investigations',
    MemberOf => $Ticket,
  ));
  $text .= "<br/><b>Investigaciones (INV) relacionadas:</b>";
  $contador = 0;
  while (my $t = $children->Next) {
    $contador++;
	$text .= "<br/> > <a href=" . RT->Config->Get("WebURL") . "Ticket/Display.html?id=" . $t->id . ">[" . RT->Config->Get('LuciaInstanceName') . " #" . $t->id . "]</a>" . " " . $t->Subject;
  }
  if ($contador == 0){$text .= "<br/> <i>(Ninguna)</i>"};
  $text .= "<br/>";
}
</p>

<hr/>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Resolved INCIDENT INV/IR in HTML',                     # loc
       Description => 'HTML resolved INCIDENT INV/IR template',    # loc
       Content     => <<'EOTEXT'
﻿Subject: [IR-INV] [Resolved] {$Ticket->Subject}
Content-Type: text/html
RT-Attach-Message: yes
From: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>
Reply-To: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>

<p style="font-size:10pt;">
<b>RESOLUCION DE REPORTE DE INCIDENTE / INVESTIGACIÓN </b><br/>
<b>Antigüedad: </b> {substr($Ticket->Created,0,10)}<br/>
<b>Cerrado por: </b>{$Transaction->CreatorObj->Name}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
{
   my $text;
   my $contador;
   my $children = RT::Tickets->new( $RT::SystemUser );
   $children->FromSQL( RT::IR->Query(
     Queue    => 'Incidents',
     HasMember => $Ticket,
   ));
   $text .= "<br/><b>Incidentes (INC) relacionados:</b>";
   $contador = 0;
   while (my $t = $children->Next) {
     $contador++;
	 $text .= "<br/> > <a href=" . RT->Config->Get("WebURL") . "Ticket/Display.html?id=" . $t->id . ">[" . RT->Config->Get('LuciaInstanceName') . " #" . $t->id . "]</a>" . " " . $t->Subject;
   }
   if ($contador == 0){$text .= "<br/> <i>(Ninguno)</i>"};
   $text .= "<br/>";
}
</p>

<hr/>

<p>{$Transaction->Content(Type =>'text/html')}</p>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Resolved SATINET in HTML',                     # loc
       Description => 'HTML resolved SATINET template',    # loc
       Content     => <<'EOTEXT'
Subject: [Resolved] {$Ticket->Subject}
Content-Type: text/html
From: SAT-INET {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATINET'};}>
Reply-To: SAT-INET {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATINET'};}>

<p style="font-size:10pt;">
<b>RESOLUCION SAT-INET</b><br/>
<b>Sonda: </b>{substr($Ticket->FirstCustomFieldValue('Constituency'),8)}<br/>
<b>Antigüedad: </b> {substr($Ticket->Created,0,10)}<br/>
<b>Vencimiento: </b> {substr($Ticket->Due,0,10)}<br/>
<b>Cerrado por: </b>{$Transaction->CreatorObj->Name}<br/>
<b>Clasificación del incidente: </b>
{
  $clas = $Ticket->FirstCustomFieldValue('Cyber Incident Classification');
  if($clas eq 'Malware'){ 
    $pic = 'Código dañino'; 
  }
  if($clas eq 'Information compromised'){ 
    $pic = 'Compromiso de información'; 
  }
  if($clas eq 'Abusive content'){ 
    $pic = 'Contenido abusivo'; 
  }
  if($clas eq 'Availability'){ 
    $pic = 'Disponibilidad'; 
  }
  if($clas eq 'Fraud'){ 
    $pic = 'Fraude'; 
  }
  if($clas eq 'Intrusions'){ 
    $pic = 'Intrusiones'; 
  }
  if($clas eq 'Security policy'){ 
    $pic = 'Política de seguridad'; 
  }
  if($clas eq 'Information gathering'){ 
    $pic = 'Obtención de información'; 
  }
  if($clas eq 'Test'){ 
    $pic = 'Test'; 
  }
  if($clas eq 'Others'){ 
    $pic = 'Otros'; 
  }
  $pic;
}<br/>
<b>Peligrosidad: </b>
{
  $pas = $Ticket->PriorityAsString;
  if($pas eq '(no value)'){ 
    $p = '(sin valor)'; 
  }
  if($pas eq 'Low'){ 
    $p = 'Baja'; 
  }
  if($pas eq 'Medium'){ 
    $p = 'Media'; 
  }
  if($pas eq 'High'){
    $p =  'Alta';
  }
  if($pas eq 'Very high'){
    $p =  'Muy alta';
  }
  if($pas eq 'Critical'){
    $p =  'Crítica';
  }
  $p;
}<br/>
<b>Resolución del incidente: </b>
{
  $res = $Ticket->FirstCustomFieldValue('Resolution');
  if($res eq 'No impact'){ 
    $p = 'Sin impacto'; 
  }
  if($res eq 'False positive'){ 
    $p = 'Falso positivo'; 
  }
  if($res eq 'No answer'){ 
    $p = 'Sin respuesta';
  }
  if($res eq 'Security incident'){
    $p =  'Incidente de seguridad';
  }
  if($res eq 'Lack of information'){
    $p =  'Falta información';
  }
  $p;
}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
</p>

<hr/>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Resolved SATSARA in HTML',                     # loc
       Description => 'HTML resolved SATSARA template',    # loc
       Content     => <<'EOTEXT'
Subject: [Resolved] {$Ticket->Subject}
Content-Type: text/html
From: SAT-SARA {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATSARA'};}>
Reply-To: SAT-SARA {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATSARA'};}>

<p style="font-size:10pt;">
<b>RESOLUCION SAT-SARA</b><br/>
<b>Sonda: </b>{substr($Ticket->FirstCustomFieldValue('Constituency'),8)}<br/>
<b>Antigüedad: </b> {substr($Ticket->Created,0,10)}<br/>
<b>Vencimiento: </b> {substr($Ticket->Due,0,10)}<br/>
<b>Cerrado por: </b>{$Transaction->CreatorObj->Name}<br/>
<b>Clasificación del incidente: </b>
{
  $clas = $Ticket->FirstCustomFieldValue('Cyber Incident Classification');
  if($clas eq 'Malware'){ 
    $pic = 'Código dañino'; 
  }
  if($clas eq 'Information compromised'){ 
    $pic = 'Compromiso de información'; 
  }
  if($clas eq 'Abusive content'){ 
    $pic = 'Contenido abusivo'; 
  }
  if($clas eq 'Availability'){ 
    $pic = 'Disponibilidad'; 
  }
  if($clas eq 'Fraud'){ 
    $pic = 'Fraude'; 
  }
  if($clas eq 'Intrusions'){ 
    $pic = 'Intrusiones'; 
  }
  if($clas eq 'Security policy'){ 
    $pic = 'Política de seguridad'; 
  }
  if($clas eq 'Information gathering'){ 
    $pic = 'Obtención de información'; 
  }
  if($clas eq 'Test'){ 
    $pic = 'Test'; 
  }
  if($clas eq 'Others'){ 
    $pic = 'Otros'; 
  }
  $pic;
}<br/>
<b>Peligrosidad: </b>
{
  $pas = $Ticket->PriorityAsString;
  if($pas eq '(no value)'){ 
    $p = '(sin valor)'; 
  }
  if($pas eq 'Low'){ 
    $p = 'Baja'; 
  }
  if($pas eq 'Medium'){ 
    $p = 'Media'; 
  }
  if($pas eq 'High'){
    $p =  'Alta';
  }
  if($pas eq 'Very high'){
    $p =  'Muy alta';
  }
  if($pas eq 'Critical'){
    $p =  'Crítica';
  }
  $p;
}<br/>
<b>Resolución del incidente: </b>
{
  $res = $Ticket->FirstCustomFieldValue('Resolution');
  if($res eq 'No impact'){ 
    $p = 'Sin impacto'; 
  }
  if($res eq 'False positive'){ 
    $p = 'Falso positivo'; 
  }
  if($res eq 'No answer'){ 
    $p = 'Sin respuesta';
  }
  if($res eq 'Security incident'){
    $p =  'Incidente de seguridad';
  }
  if($res eq 'Lack of information'){
    $p =  'Falta información';
  }
  $p;
}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
</p>

<hr/>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Autoresolved INCIDENT in HTML',                     # loc
       Description => 'HTML autoresolved INCIDENT template',    # loc
       Content     => <<'EOTEXT'
Subject: [INC] [AutoResolved] {$Ticket->Subject}
Content-Type: text/html
From: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>
Reply-To: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>

<p style="font-size:10pt;">
<b>AUTORESOLUCION DE INCIDENTE POR VENCIMIENTO</b><br/>
<b>Antigüedad: </b> {substr($Ticket->Created,0,10)}<br/>
<b>Vencimiento: </b> {substr($Ticket->Due,0,10)}<br/>
<b>Cerrado por: </b>{$Transaction->CreatorObj->Name}<br/>
<b>Clasificación del incidente: </b>
{
  $clas = $Ticket->FirstCustomFieldValue('Cyber Incident Classification');
  if($clas eq 'Malware'){ 
    $pic = 'Código dañino'; 
  }
  if($clas eq 'Information compromised'){ 
    $pic = 'Compromiso de información'; 
  }
  if($clas eq 'Abusive content'){ 
    $pic = 'Contenido abusivo'; 
  }
  if($clas eq 'Availability'){ 
    $pic = 'Disponibilidad'; 
  }
  if($clas eq 'Fraud'){ 
    $pic = 'Fraude'; 
  }
  if($clas eq 'Intrusions'){ 
    $pic = 'Intrusiones'; 
  }
  if($clas eq 'Security policy'){ 
    $pic = 'Política de seguridad'; 
  }
  if($clas eq 'Information gathering'){ 
    $pic = 'Obtención de información'; 
  }
  if($clas eq 'Test'){ 
    $pic = 'Test'; 
  }
  if($clas eq 'Others'){ 
    $pic = 'Otros'; 
  }
  $pic;
}<br/>
<b>Peligrosidad: </b>
{
  $pas = $Ticket->PriorityAsString;
  if($pas eq '(no value)'){ 
    $p = '(sin valor)'; 
  }
  if($pas eq 'Low'){ 
    $p = 'Baja'; 
  }
  if($pas eq 'Medium'){ 
    $p = 'Media'; 
  }
  if($pas eq 'High'){
    $p =  'Alta';
  }
  if($pas eq 'Very high'){
    $p =  'Muy alta';
  }
  if($pas eq 'Critical'){
    $p =  'Crítica';
  }
  $p;
}<br/>
<b>Resolución del incidente: </b>
{
  $res = $Ticket->FirstCustomFieldValue('Resolution');
  if($res eq 'No impact'){ 
    $p = 'Sin impacto'; 
  }
  if($res eq 'False positive'){ 
    $p = 'Falso positivo'; 
  }
  if($res eq 'No answer'){ 
    $p = 'Sin respuesta';
  }
  if($res eq 'Security incident'){
    $p =  'Incidente de seguridad';
  }
  if($res eq 'Lack of information'){
    $p =  'Falta información';
  }
  $p;
}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
{
  my $text;
  my $contador;
  my $children = RT::Tickets->new( $RT::SystemUser );
  $children->FromSQL( RT::IR->Query(
	Queue    => 'Incident Reports',
    MemberOf => $Ticket,
  ));
  $text .= "<br/><b>Reportes de Incidentes (IR) relacionados:</b>";
  $contador = 0;
  while (my $t = $children->Next) {
    $contador++;
	$text .= "<br/> > <a href=" . RT->Config->Get("WebURL") . "Ticket/Display.html?id=" . $t->id . ">[" . RT->Config->Get('LuciaInstanceName') . " #" . $t->id . "]</a>" . " " . $t->Subject;
  }
  if ($contador == 0){$text .= "<br/> <i>(Ninguno)</i>"};
  $text .= "<br/>";
  $children = RT::Tickets->new( $RT::SystemUser );
  $children->FromSQL( RT::IR->Query(
    Queue    => 'Investigations',
    MemberOf => $Ticket,
  ));
  $text .= "<br/><b>Investigaciones (INV) relacionadas:</b>";
  $contador = 0;
  while (my $t = $children->Next) {
    $contador++;
	$text .= "<br/> > <a href=" . RT->Config->Get("WebURL") . "Ticket/Display.html?id=" . $t->id . ">[" . RT->Config->Get('LuciaInstanceName') . " #" . $t->id . "]</a>" . " " . $t->Subject;
  }
  if ($contador == 0){$text .= "<br/> <i>(Ninguna)</i>"};
  $text .= "<br/>";
}
</p>

<hr/>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Autoresolved SATINET in HTML',                     # loc
       Description => 'HTML autoresolved SATINET template',    # loc
       Content     => <<'EOTEXT'
Subject: [AutoResolved] {$Ticket->Subject}
Content-Type: text/html
From: SAT-INET {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATINET'};}>
Reply-To: SAT-INET {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATINET'};}>

<p style="font-size:10pt;">
<b>AUTORESOLUCION SAT-INET POR VENCIMIENTO</b><br/>
<b>Sonda: </b>{substr($Ticket->FirstCustomFieldValue('Constituency'),8)}<br/>
<b>Antigüedad: </b> {substr($Ticket->Created,0,10)}<br/>
<b>Vencimiento: </b> {substr($Ticket->Due,0,10)}<br/>
<b>Cerrado por: </b>{$Transaction->CreatorObj->Name}<br/>
<b>Clasificación del incidente: </b>
{
  $clas = $Ticket->FirstCustomFieldValue('Cyber Incident Classification');
  if($clas eq 'Malware'){ 
    $pic = 'Código dañino'; 
  }
  if($clas eq 'Information compromised'){ 
    $pic = 'Compromiso de información'; 
  }
  if($clas eq 'Abusive content'){ 
    $pic = 'Contenido abusivo'; 
  }
  if($clas eq 'Availability'){ 
    $pic = 'Disponibilidad'; 
  }
  if($clas eq 'Fraud'){ 
    $pic = 'Fraude'; 
  }
  if($clas eq 'Intrusions'){ 
    $pic = 'Intrusiones'; 
  }
  if($clas eq 'Security policy'){ 
    $pic = 'Política de seguridad'; 
  }
  if($clas eq 'Information gathering'){ 
    $pic = 'Obtención de información'; 
  }
  if($clas eq 'Test'){ 
    $pic = 'Test'; 
  }
  if($clas eq 'Others'){ 
    $pic = 'Otros'; 
  }
  $pic;
}<br/>
<b>Peligrosidad: </b>
{
  $pas = $Ticket->PriorityAsString;
  if($pas eq '(no value)'){ 
    $p = '(sin valor)'; 
  }
  if($pas eq 'Low'){ 
    $p = 'Baja'; 
  }
  if($pas eq 'Medium'){ 
    $p = 'Media'; 
  }
  if($pas eq 'High'){
    $p =  'Alta';
  }
  if($pas eq 'Very high'){
    $p =  'Muy alta';
  }
  if($pas eq 'Critical'){
    $p =  'Crítica';
  }
  $p;
}<br/>
<b>Resolución del incidente: </b>
{
  $res = $Ticket->FirstCustomFieldValue('Resolution');
  if($res eq 'No impact'){ 
    $p = 'Sin impacto'; 
  }
  if($res eq 'False positive'){ 
    $p = 'Falso positivo'; 
  }
  if($res eq 'No answer'){ 
    $p = 'Sin respuesta';
  }
  if($res eq 'Security incident'){
    $p =  'Incidente de seguridad';
  }
  if($res eq 'Lack of information'){
    $p =  'Falta información';
  }
  $p;
}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
</p>

<hr/>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Autoresolved SATSARA in HTML',                     # loc
       Description => 'HTML autoresolved SATSARA template',    # loc
       Content     => <<'EOTEXT'
Subject: [AutoResolved] {$Ticket->Subject}
Content-Type: text/html
From: SAT-SARA {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATSARA'};}>
Reply-To: SAT-SARA {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATSARA'};}>

<p style="font-size:10pt;">
<b>AUTORESOLUCION SAT-SARA POR VENCIMIENTO</b><br/>
<b>Sonda: </b>{substr($Ticket->FirstCustomFieldValue('Constituency'),8)}<br/>
<b>Antigüedad: </b> {substr($Ticket->Created,0,10)}<br/>
<b>Vencimiento: </b> {substr($Ticket->Due,0,10)}<br/>
<b>Cerrado por: </b>{$Transaction->CreatorObj->Name}<br/>
<b>Clasificación del incidente: </b>
{
  $clas = $Ticket->FirstCustomFieldValue('Cyber Incident Classification');
  if($clas eq 'Malware'){ 
    $pic = 'Código dañino'; 
  }
  if($clas eq 'Information compromised'){ 
    $pic = 'Compromiso de información'; 
  }
  if($clas eq 'Abusive content'){ 
    $pic = 'Contenido abusivo'; 
  }
  if($clas eq 'Availability'){ 
    $pic = 'Disponibilidad'; 
  }
  if($clas eq 'Fraud'){ 
    $pic = 'Fraude'; 
  }
  if($clas eq 'Intrusions'){ 
    $pic = 'Intrusiones'; 
  }
  if($clas eq 'Security policy'){ 
    $pic = 'Política de seguridad'; 
  }
  if($clas eq 'Information gathering'){ 
    $pic = 'Obtención de información'; 
  }
  if($clas eq 'Test'){ 
    $pic = 'Test'; 
  }
  if($clas eq 'Others'){ 
    $pic = 'Otros'; 
  }
  $pic;
}<br/>
<b>Peligrosidad: </b>
{
  $pas = $Ticket->PriorityAsString;
  if($pas eq '(no value)'){ 
    $p = '(sin valor)'; 
  }
  if($pas eq 'Low'){ 
    $p = 'Baja'; 
  }
  if($pas eq 'Medium'){ 
    $p = 'Media'; 
  }
  if($pas eq 'High'){
    $p =  'Alta';
  }
  if($pas eq 'Very high'){
    $p =  'Muy alta';
  }
  if($pas eq 'Critical'){
    $p =  'Crítica';
  }
  $p;
}<br/>
<b>Resolución del incidente: </b>
{
  $res = $Ticket->FirstCustomFieldValue('Resolution');
  if($res eq 'No impact'){ 
    $p = 'Sin impacto'; 
  }
  if($res eq 'False positive'){ 
    $p = 'Falso positivo'; 
  }
  if($res eq 'No answer'){ 
    $p = 'Sin respuesta';
  }
  if($res eq 'Security incident'){
    $p =  'Incidente de seguridad';
  }
  if($res eq 'Lack of information'){
    $p =  'Falta información';
  }
  $p;
}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
</p>

<hr/>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Reminder in HTML',                     # loc
       Description => 'HTML reminder template',    # loc
       Content     => <<'EOTEXT'
Subject: [INC] [Reminder] {$Ticket->Subject}
Content-Type: text/html
From: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>
Reply-To: INCIDENTES {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'INCIDENT'};}>

<p style="font-size:10pt;">
<b>RECORDATORIO DE INCIDENTE</b><br/>
<b>Antigüedad: </b> {substr($Ticket->Created,0,10)}<br/>
<b>Vencimiento: </b> {substr($Ticket->Due,0,10)}<br/>
<b>Creado por: </b>{$Transaction->CreatorObj->Name}<br/>
<b>Clasificación del incidente: </b>
{
  $clas = $Ticket->FirstCustomFieldValue('Cyber Incident Classification');
  if($clas eq 'Malware'){ 
    $pic = 'Código dañino'; 
  }
  if($clas eq 'Information compromised'){ 
    $pic = 'Compromiso de información'; 
  }
  if($clas eq 'Abusive content'){ 
    $pic = 'Contenido abusivo'; 
  }
  if($clas eq 'Availability'){ 
    $pic = 'Disponibilidad'; 
  }
  if($clas eq 'Fraud'){ 
    $pic = 'Fraude'; 
  }
  if($clas eq 'Intrusions'){ 
    $pic = 'Intrusiones'; 
  }
  if($clas eq 'Security policy'){ 
    $pic = 'Política de seguridad'; 
  }
  if($clas eq 'Information gathering'){ 
    $pic = 'Obtención de información'; 
  }
  if($clas eq 'Test'){ 
    $pic = 'Test'; 
  }
  if($clas eq 'Others'){ 
    $pic = 'Otros'; 
  }
  $pic;
}<br/>
<b>Peligrosidad: </b>
{
  $pas = $Ticket->PriorityAsString;
  if($pas eq '(no value)'){ 
    $p = '(sin valor)'; 
  }
  if($pas eq 'Low'){ 
    $p = 'Baja'; 
  }
  if($pas eq 'Medium'){ 
    $p = 'Media'; 
  }
  if($pas eq 'High'){
    $p =  'Alta';
  }
  if($pas eq 'Very high'){
    $p =  'Muy alta';
  }
  if($pas eq 'Critical'){
    $p =  'Crítica';
  }
  $p;
}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
{
  my $text;
  my $contador;
  my $children = RT::Tickets->new( $RT::SystemUser );
  $children->FromSQL( RT::IR->Query(
	Queue    => 'Incident Reports',
    MemberOf => $Ticket,
  ));
  $text .= "<br/><b>Reportes de Incidentes (IR) relacionados:</b>";
  $contador = 0;
  while (my $t = $children->Next) {
    $contador++;
	$text .= "<br/> > <a href=" . RT->Config->Get("WebURL") . "Ticket/Display.html?id=" . $t->id . ">[" . RT->Config->Get('LuciaInstanceName') . " #" . $t->id . "]</a>" . " " . $t->Subject;
  }
  if ($contador == 0){$text .= "<br/> <i>(Ninguno)</i>"};
  $text .= "<br/>";
  $children = RT::Tickets->new( $RT::SystemUser );
  $children->FromSQL( RT::IR->Query(
    Queue    => 'Investigations',
    MemberOf => $Ticket,
  ));
  $text .= "<br/><b>Investigaciones (INV) relacionadas:</b>";
  $contador = 0;
  while (my $t = $children->Next) {
    $contador++;
	$text .= "<br/> > <a href=" . RT->Config->Get("WebURL") . "Ticket/Display.html?id=" . $t->id . ">[" . RT->Config->Get('LuciaInstanceName') . " #" . $t->id . "]</a>" . " " . $t->Subject;
  }
  if ($contador == 0){$text .= "<br/> <i>(Ninguna)</i>"};
  $text .= "<br/>";
}
</p>

<hr/>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Reminder SATINET in HTML',                     # loc
       Description => 'HTML SATINET reminder template',    # loc
       Content     => <<'EOTEXT'
Subject: [Reminder] {$Ticket->Subject}
Content-Type: text/html
From: SAT-INET {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATINET'};}>
Reply-To: SAT-INET {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATINET'};}>

<p style="font-size:10pt;">
<b>RECORDATORIO SAT-INET</b><br/>
<b>Sonda: </b>{substr($Ticket->FirstCustomFieldValue('Constituency'),8)}<br/>
<b>Antigüedad: </b> {substr($Ticket->Created,0,10)}<br/>
<b>Vencimiento: </b> <font color="red">{substr($Ticket->Due,0,10)}</font><br/>
<b>Clasificación del incidente: </b>
{
  $clas = $Ticket->FirstCustomFieldValue('Cyber Incident Classification');
  if($clas eq 'Malware'){ 
    $pic = 'Código dañino'; 
  }
  if($clas eq 'Information compromised'){ 
    $pic = 'Compromiso de información'; 
  }
  if($clas eq 'Abusive content'){ 
    $pic = 'Contenido abusivo'; 
  }
  if($clas eq 'Availability'){ 
    $pic = 'Disponibilidad'; 
  }
  if($clas eq 'Fraud'){ 
    $pic = 'Fraude'; 
  }
  if($clas eq 'Intrusions'){ 
    $pic = 'Intrusiones'; 
  }
  if($clas eq 'Security policy'){ 
    $pic = 'Política de seguridad'; 
  }
  if($clas eq 'Information gathering'){ 
    $pic = 'Obtención de información'; 
  }
  if($clas eq 'Test'){ 
    $pic = 'Test'; 
  }
  if($clas eq 'Others'){ 
    $pic = 'Otros'; 
  }
  $pic;
}<br/>
<b>Peligrosidad: </b>
{
  $pas = $Ticket->PriorityAsString;
  if($pas eq '(no value)'){ 
    $p = '(sin valor)'; 
  }
  if($pas eq 'Low'){ 
    $p = 'Baja'; 
  }
  if($pas eq 'Medium'){ 
    $p = 'Media'; 
  }
  if($pas eq 'High'){
    $p =  'Alta';
  }
  if($pas eq 'Very high'){
    $p =  'Muy alta';
  }
  if($pas eq 'Critical'){
    $p =  'Crítica';
  }
  $p;
}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
</p>

<hr/>

EOTEXT
    },
	{  Queue       => '0',
       Name        => 'Reminder SATSARA in HTML',                     # loc
       Description => 'HTML SATSARA reminder template',    # loc
       Content     => <<'EOTEXT'
Subject: [Reminder] {$Ticket->Subject}
Content-Type: text/html
From: SAT-SARA {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATSARA'};}>
Reply-To: SAT-SARA {RT->Config->Get('LuciaInstanceName')} <{my %hash=RT->Config->Get('LuciaTicketCategoryEmailAddresses');$hash{'SATSARA'};}>

<p style="font-size:10pt;">
<b>RECORDATORIO SAT-SARA</b><br/>
<b>Sonda: </b>{substr($Ticket->FirstCustomFieldValue('Constituency'),8)}<br/>
<b>Antigüedad: </b> {substr($Ticket->Created,0,10)}<br/>
<b>Vencimiento: </b> <font color="red">{substr($Ticket->Due,0,10)}</font><br/>
<b>Clasificación del incidente: </b>
{
  $clas = $Ticket->FirstCustomFieldValue('Cyber Incident Classification');
  if($clas eq 'Malware'){ 
    $pic = 'Código dañino'; 
  }
  if($clas eq 'Information compromised'){ 
    $pic = 'Compromiso de información'; 
  }
  if($clas eq 'Abusive content'){ 
    $pic = 'Contenido abusivo'; 
  }
  if($clas eq 'Availability'){ 
    $pic = 'Disponibilidad'; 
  }
  if($clas eq 'Fraud'){ 
    $pic = 'Fraude'; 
  }
  if($clas eq 'Intrusions'){ 
    $pic = 'Intrusiones'; 
  }
  if($clas eq 'Security policy'){ 
    $pic = 'Política de seguridad'; 
  }
  if($clas eq 'Information gathering'){ 
    $pic = 'Obtención de información'; 
  }
  if($clas eq 'Test'){ 
    $pic = 'Test'; 
  }
  if($clas eq 'Others'){ 
    $pic = 'Otros'; 
  }
  $pic;
}<br/>
<b>Peligrosidad: </b>
{
  $pas = $Ticket->PriorityAsString;
  if($pas eq '(no value)'){ 
    $p = '(sin valor)'; 
  }
  if($pas eq 'Low'){ 
    $p = 'Baja'; 
  }
  if($pas eq 'Medium'){ 
    $p = 'Media'; 
  }
  if($pas eq 'High'){
    $p =  'Alta';
  }
  if($pas eq 'Very high'){
    $p =  'Muy alta';
  }
  if($pas eq 'Critical'){
    $p =  'Crítica';
  }
  $p;
}<br/>
<b>URL: </b> <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a><br/>
</p>

<hr/>

EOTEXT
    },
);

@Scrips = (
    {  Queue		  => 'Investigations',
       Description    => 'On Create INV Autoreply To Requestors',
       ScripCondition => 'On Create',
       ScripAction    => 'AutoReply To Requestors',
       Template       => 'AutoReply INV in HTML' 
    },
    {  Queue			 => 'Incident Reports',
       Description    => 'On Create IR Autoreply To Requestors',
       ScripCondition => 'On Create',
       ScripAction    => 'AutoReply To Requestors',
       Template       => 'AutoReply IR in HTML' 
    },
    {  Queue		  => 'Investigations',
       Description    => 'On Create INV Notify Ccs',
       ScripCondition => 'On Create',
       ScripAction    => 'Notify Ccs',
       Template       => 'AutoReply INV in HTML' 
    },
    {  Queue			 => 'Incident Reports',
       Description    => 'On Create IR Notify Ccs',
       ScripCondition => 'On Create',
       ScripAction    => 'Notify Ccs',
       Template       => 'AutoReply IR in HTML' 
    },
    {  Queue			 => ['Incident Reports', 'Investigations'],
       Description    => 'On Resolve INV/IR Notify Requestors and Ccs',
       ScripCondition => 'On Resolve',
       ScripAction    => 'Notify Requestors and Ccs',
       Template       => 'Resolved INV/IR in HTML' 
    },
    {  Queue			 => 'Incidents',
       Description       => "[Lucia] Set Due Date according to Priority",
       ScripCondition    => '[Lucia] On Priority edition',
       ScripAction       => '[Lucia] SetDueDate',
       Template          => 'Blank',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => 'Incidents',
       Description       => "[Lucia] Set Situation",
       ScripCondition    => '[Lucia] On any activity',
       ScripAction       => '[Lucia] SetSituation',
       Template          => 'Blank',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => 'Incidents',
       Description       => "[Lucia] Check Constituency",
       ScripCondition    => '[Lucia] On any edition',
       ScripAction       => '[Lucia] CheckConstituency',
       Template          => 'Blank',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => 'Incidents',
       Description       => "[Lucia] Set Reminders",
       ScripCondition    => 'On Create',
       ScripAction       => '[Lucia] SetReminders',
       Template          => 'Blank',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => 'Incidents',
       Description       => "[Lucia] Send Create INCIDENT INC Notification",
       ScripCondition    => '[Lucia] CreateINCIDENTTicket',
       ScripAction       => '[Lucia] SendNotification',
       Template          => 'Autoreply INCIDENT INC in HTML',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => ['Incident Reports', 'Investigations'],
       Description       => "[Lucia] Send Create INCIDENT INV/IR Notification",
       ScripCondition    => '[Lucia] CreateINCIDENTTicket',
       ScripAction       => '[Lucia] SendNotification',
       Template          => 'Autoreply INCIDENT INV/IR in HTML',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => 'Incidents',
       Description       => "[Lucia] Send Create SATINET Notification",
       ScripCondition    => '[Lucia] CreateSATINETTicket',
       ScripAction       => '[Lucia] SendNotification',
       Template          => 'Autoreply SATINET in HTML',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => 'Incidents',
       Description       => "[Lucia] Send Create SATSARA Notification",
       ScripCondition    => '[Lucia] CreateSATSARATicket',
       ScripAction       => '[Lucia] SendNotification',
       Template          => 'Autoreply SATSARA in HTML',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => ['Incidents', 'Incident Reports', 'Investigations'],
       Description       => "[Lucia] Send Reopen INCIDENT Notification",
       ScripCondition    => '[Lucia] ReopenINCIDENTTicket',
       ScripAction       => '[Lucia] SendNotification',
       Template          => 'Autoreply Reopen INCIDENT in HTML',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => 'Incidents',
       Description       => "[Lucia] Send Reopen SATINET Notification",
       ScripCondition    => '[Lucia] ReopenSATINETTicket',
       ScripAction       => '[Lucia] SendNotification',
       Template          => 'Autoreply Reopen SATINET in HTML',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => 'Incidents',
       Description       => "[Lucia] Send Reopen SATSARA Notification",
       ScripCondition    => '[Lucia] ReopenSATSARATicket',
       ScripAction       => '[Lucia] SendNotification',
       Template          => 'Autoreply Reopen SATSARA in HTML',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => ['Incidents'],
       Description       => "[Lucia] Send Comment INCIDENT INC Notification",
       ScripCondition    => '[Lucia] CommentINCIDENTTicket',
       ScripAction       => '[Lucia] SendNotification',
       Template          => 'Commented INCIDENT INC in HTML',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => ['Incident Reports', 'Investigations'],
       Description       => "[Lucia] Send Comment INCIDENT INV/IR Notification",
       ScripCondition    => '[Lucia] CommentINCIDENTTicket',
       ScripAction       => '[Lucia] SendNotification',
       Template          => 'Commented INCIDENT INV/IR in HTML',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => 'Incidents',
       Description       => "[Lucia] Send Comment SATINET Notification",
       ScripCondition    => '[Lucia] CommentSATINETTicket',
       ScripAction       => '[Lucia] SendNotification',
       Template          => 'Commented SATINET in HTML',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => 'Incidents',
       Description       => "[Lucia] Send Comment SATSARA Notification",
       ScripCondition    => '[Lucia] CommentSATSARATicket',
       ScripAction       => '[Lucia] SendNotification',
       Template          => 'Commented SATSARA in HTML',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => 'Incidents',
       Description       => "[Lucia] Send Close INCIDENT INC Notification",
       ScripCondition    => '[Lucia] CloseINCIDENTTicket',
       ScripAction       => '[Lucia] SendNotification',
       Template          => 'Resolved INCIDENT INC in HTML',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => ['Incident Reports', 'Investigations'],
       Description       => "[Lucia] Send Close INCIDENT INV/IR Notification",
       ScripCondition    => '[Lucia] CloseINCIDENTTicket',
       ScripAction       => '[Lucia] SendNotification',
       Template          => 'Resolved INCIDENT INV/IR in HTML',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => 'Incidents',
       Description       => "[Lucia] Send Close SATINET Notification",
       ScripCondition    => '[Lucia] CloseSATINETTicket',
       ScripAction       => '[Lucia] SendNotification',
       Template          => 'Resolved SATINET in HTML',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => 'Incidents',
       Description       => "[Lucia] Send Close SATSARA Notification",
       ScripCondition    => '[Lucia] CloseSATSARATicket',
       ScripAction       => '[Lucia] SendNotification',
       Template          => 'Resolved SATSARA in HTML',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => ['Incidents', 'Incident Reports', 'Investigations'],
       Description       => "[Lucia] Send AutoClose INCIDENT Notification",
       ScripCondition    => '[Lucia] AutoCloseINCIDENTTicket',
       ScripAction       => '[Lucia] SendNotification',
       Template          => 'Autoresolved INCIDENT in HTML',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => 'Incidents',
       Description       => "[Lucia] Send AutoClose SATINET Notification",
       ScripCondition    => '[Lucia] AutoCloseSATINETTicket',
       ScripAction       => '[Lucia] SendNotification',
       Template          => 'Autoresolved SATINET in HTML',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => 'Incidents',
       Description       => "[Lucia] Send AutoClose SATSARA Notification",
       ScripCondition    => '[Lucia] AutoCloseSATSARATicket',
       ScripAction       => '[Lucia] SendNotification',
       Template          => 'Autoresolved SATSARA in HTML',
       Stage             => 'TransactionBatch' 
    },
    {  Queue			 => 'Incidents',
       Description       => "[Lucia] Store Sync Request after change in ticket",
       ScripCondition    => 'On Transaction',
       ScripAction       => '[Lucia] StoreSyncRequest',
       Template          => 'Blank',
       Stage             => 'TransactionBatch' 
    },
);
