DynamicField Date/Time in Genreic Agent abfragen

Hilfe zu OTRS Problemen aller Art
Post Reply
mh254
Znuny newbie
Posts: 37
Joined: 03 Mar 2010, 12:00
Znuny Version: 3.1.1
Real Name: Markus Hoffmann
Location: Helmbrechts

DynamicField Date/Time in Genreic Agent abfragen

Post by mh254 »

Halo Zusammen,

ich habe von 2.4.9 auf 3.1.11 aktualisiert (Zwischenschritt 3.0.x hab ich natürlich auch gemacht) und es funktioniert soweit auch Alles. Ich habe allerdings ein Problem mit den Dynamischen Feldern.
Ich habe mit der 2.4.9 einen Generic Agent eingerichtet, der das FreeTime-Feld ausliest und eine Email verschickt und das Ticket verschiebt, wenn das Datum des FreeTime-Feldes überschritten ist.

Code: Select all

    # [name of job] -> send reminder emails to agents
    # --
    'send reminder emails to agents' => {
        # get all tickets with these properties
		QueueIDs => [ 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16 ],
		StateType    => [ 'open', 'processing', 'new', 'pending auto', 'pending reminder' ],
        TicketFreeTime1OlderDate => $TimeStamp,
        # new ticket properties (no option is required,
        # use just the options which should be changed!)
        New => {
			QueueID         => 17,
			Priority        => '5 very high',
			TicketFreeKey3 => 'Projektstand',
            TicketFreeText3 => 'Der geplante Endzeitpunkt ist erreicht!',
            # if you want to add a Note
            Note => {
                From => 'Ticketsystem der IT!works Systemhaus GmbH',
                Subject => 'Reminder Notification',
                Body => 'Der geplante Endzeitpunkt ist erreicht!',
				ArticleType => 'note-external',      # note-internal|note-external|note-report 
            },
            # notify all agents who selected the queue in "my queues/custom queues"
            #Module => 'Kernel::System::GenericAgent::NotifyAgentGroupOfCustomQueue',
            # notify all agents who can access the ticket with rw permissions
            Module => 'Kernel::System::GenericAgent::NotifyAgentGroupWithWritePermission',
        },
    },
Wie bekomme ich den Generic Agent mit den Dynamischen Felder zu Laufen? Ich habe schon versucht, vor dem Free... ein DynamicField_ zu verwenden, aber dann kommt der Fehler das die globale Variable $TimeStamp unbekannt sei.

Gruß
Markus
Produktiv:
OTRS: 3.1.11
OS: Ubuntu Server 12.04
Apache2/MySQL 5
Test:
OTRS: 3.1.1
OS: Ubuntu Server 12.04
Apache2/MySQL 5
mh254
Znuny newbie
Posts: 37
Joined: 03 Mar 2010, 12:00
Znuny Version: 3.1.1
Real Name: Markus Hoffmann
Location: Helmbrechts

Re: DynamicField Date/Time in Genreic Agent abfragen

Post by mh254 »

Ok,

das mit dem Timestamp hab ich selber verbockt :-(

Aber jetzt habe ich immer noch das Problem, das der GE einfach alle Tickets in den Queues nimmt, nicht nur die, bei denen der Zeitpunkt im DynamicField erreicht ist. Hier nochmal der aktuelle Code:

Code: Select all

    # [name of job] -> send reminder emails to agents
    # --
    'send reminder emails to agents' => {
        # get all tickets with these properties
#       QueueIDs => [ 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16 ],
        QueueIDs => [ 17, 22 ],
        StateType    => [ 'open', 'processing', 'new', 'pending auto', 'pending reminder' ],
        DynamicField_TicketFreeTime1OlderDate => $TimeStamp,
        # new ticket properties (no option is required,
        # use just the options which should be changed!)
        New => {
                        QueueID         => 17,
                        Priority        => '5 very high',
                        #TicketFreeKey3 => 'Projektstand',
                        DynamicField_TicketFreeText3 => 'Der geplante Endzeitpunkt ist erreicht!',
            # if you want to add a Note
        Note => {
                        From => 'Ticketsystem der IT!works Systemhaus GmbH',
                        Subject => 'Reminder Notification',
                        Body => 'Der geplante Endzeitpunkt ist erreicht! $Timestamp .',
                        ArticleType => 'note-external',      # note-internal|note-external|note-report
            },
            # notify all agents who selected the queue in "my queues/custom queues"
            #Module => 'Kernel::System::GenericAgent::NotifyAgentGroupOfCustomQueue',
            # notify all agents who can access the ticket with rw permissions
            Module => 'Kernel::System::GenericAgent::NotifyAgentGroupWithWritePermission',
        },
    },
Und nochmal die Frage, was mache ich falsch mit den Dynamischen Feldern?

Gruß
Markus
Produktiv:
OTRS: 3.1.11
OS: Ubuntu Server 12.04
Apache2/MySQL 5
Test:
OTRS: 3.1.1
OS: Ubuntu Server 12.04
Apache2/MySQL 5
Post Reply