Dear Martin,
Thank you!
I'm currently trying to save new a new value into a Dynamic Field. To do
this I use ValueSet from the BackendObject. ValueSet needs a
DynamicFieldConfig. I'm trying to get this from the DynamicFieldGet method.
It's not working yet. Any idea why ?
This is how I created my BackendObject:
$Self->{BackendObject} = Kernel::System::DynamicField::Backend->new(
EncodeObject => $Param{TicketObject}->{EncodeObject},
MainObject => $Param{TicketObject}->{MainObject},
DBObject => $Param{TicketObject}->{DBObject},
TimeObject => $Param{TicketObject}->{TimeObject},
%Param,
);
This is how I try to update a Dynamic Field (not working) :
# get dynamic field config
my $DynamicField = $Self->{DynamicFieldObject}->DynamicFieldGet(
Name => "DynamicField_somename",
);
my $DynamicFieldConfig = $DynamicField->{Config};
$Self->{LogObject}->Log(
Priority=>'debug',
Message=> 'DynamicField ' . Dumper(\$DynamicField),
);
$Self->{LogObject}->Log(
Priority=>'debug',
Message=> 'DynamicFieldConfig ' . Dumper(\$DynamicFieldConfig),
);
my $Success = $Self->{BackendObject}->ValueSet(
DynamicFieldConfig => $DynamicFieldConfig,
ObjectID => $Param{Data}->{TicketID},
Value => [
{
$DestinationSystemTime,
},
],
UserID => $Param{UserID},
);
if ( !$Success ) {
$Self->{LogObject}->Log(
Priority => 'error',
Message =>
"Can not set value to current time for dynamic
field$DynamicFieldConfig->{Name}!"
);
}
# print updated DynamicField_somename
$Self->{LogObject}->Log(
Priority=>'debug',
Message => 'DynamicField_somename ' .
Dumper(\$Ticket{DynamicField_somename}),
);
On Tue, Dec 16, 2014 at 2:02 PM, Martin Gruner <[email protected]>
wrote:
> Hi Roald,
>
> yes this is possible. OTRS also uses a ticket event handler to caclulate
> and store the escalation times for the tickets. This (target) time
> calculation only happens when there are changes to the tickets. The
> escalation notifications etc. are independent of that.
> Of course you can also use a GA job to do this if the delay is ok.
>
> Regards, mg
>
> Am 12.12.14 um 16:43 schrieb Roald:
> > Dear Martijn,
> >
> > Thank you for your reply.
> >
> > I'm currently spending some time at this.
> >
> > It seems to me that a custom ticket event handler can't be used.
> > Suppose I have a field "Time To Intervention" and there needs to be a
> > time based escalation. Is it possible to do time based escalations on
> > dynamic fields using a custom ticket event handler ? I have to do some
> > calculations and look at the calendars.
> >
> > That's why I thought using a generic agent to run every few minutes and
> > look at all open tickets should be the way to go. Maybe do it a bit
> > smarter by only looking at open tickets which fullfull some criteria
> > such as not escalating yet.
> >
> > Thanks!,
> >
> > With kind regards,
> > Roald
> >
> >
> >
> >
> >
> >
> >
> >
> > On Fri, Nov 28, 2014 at 1:00 PM, <[email protected]
> > <mailto:[email protected]>> wrote:
> >
> > Send dev mailing list submissions to
> > [email protected] <mailto:[email protected]>
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> > http://lists.otrs.org/cgi-bin/listinfo/dev
> > or, via email, send a message with subject or body 'help' to
> > [email protected] <mailto:[email protected]>
> >
> > You can reach the person managing the list at
> > [email protected] <mailto:[email protected]>
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of dev digest..."
> >
> >
> > Today's Topics:
> >
> > 1. Re: developing custom SLA/Service escalations and
> > notifications (Martin Gruner)
> > 2. OTRS 5 development (Martin Gruner)
> >
> >
> >
> ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Thu, 27 Nov 2014 13:24:24 +0100
> > From: Martin Gruner <[email protected]
> > <mailto:[email protected]>>
> > Subject: Re: [dev] developing custom SLA/Service escalations and
> > notifications
> > To: Development community of OTRS <[email protected] <mailto:[email protected]
> >>
> > Message-ID: <[email protected]
> > <mailto:[email protected]>>
> > Content-Type: text/plain; charset=windows-1252
> >
> > Hello Roald,
> >
> > Am 26.11.14 um 17:29 schrieb Roald:
> > > Hi,
> > >
> > > I'm new to OTRS development.
> > >
> > > Requirements in a nutshell:
> > > * set custom fields for SLA's
> > > * calculate whether a ticket escalates based on these custom
> fields (do
> > > some custom calculations)
> > > * send notifications to agents based on these escalations
> > > * there are also other requirements but most can be solved without
> > > development
> > >
> > > Idea on how to approach this:
> > > * xml file in /opt/otrs/Kernel/Config/Files which uses
> SLAPreferences
> > >
> > > <?xml version="1.0" encoding="utf-8" ?>
> > > <otrs_config version="1.0" init="Framework">
> > > <ConfigItem Name="SLAPreferences###010-TTI" Required="0"
> Valid="1">
> > > <Description Translatable="1">Time To
> Intervention.</Description>
> > > <Group>Ticket</Group>
> > > <SubGroup>Frontend::SLA::Preferences</SubGroup>
> > > <Setting>
> > > <Hash>
> > > <Item
> > > Key="Module">Kernel::Output::HTML::SLAPreferencesGeneric</Item>
> > > <Item Key="Label">label for dynamic field</Item>
> > > <Item Key="Desc">description.</Item>
> > > <Item Key="Block">Input</Item>
> > > <Item Key="PrefKey">dynamicfield</Item>
> > > </Hash>
> > > </Setting>
> > > </ConfigItem>
> > > ........
> > > </otrs_config>
> > >
> > > * write a custom module with a job that should be run by Generic
> Agent
> > > to do the rest. Maybe split it in two modules.
> > >
> > > Questions:
> > > * Is my approach the most straightforward and suitable one ?
> >
> > Sounds pretty straightforward. I think you might not need a GA job,
> but
> > could do with a custom ticket event handler like
> > Kernel::System::Ticket::Event::TicketEscalationIndex instead.
> >
> > > * How do I calculate using the calendars ? For example hours
> outside
> > > business hours don't count for one specific calendar. While there
> is
> > > also a 24/7 calendar.
> >
> > I'd recommend to tailor the calendars just as you need. For 24/7 you
> can
> > have a calendar that has everything marked, for the other one just
> > define all non-business hours as business hours.
> >
> > Regarding the question from your other mail: with the custom event
> > handler you can also set a dynamic field.
> >
> > Good luck!
> >
> > Best regards, mg
> >
> > --
> > Martin Gruner
> > Senior Developer R&D
> >
> > OTRS AG
> > Bahnhofplatz 1a
> > 94315 Straubing
> >
> > T: +49 (0)6172 681988 0
> > F: +49 (0)9421 56818 18
> > I: www.otrs.com/ <http://www.otrs.com/>
> >
> > Gesch?ftssitz: Bad Homburg, Amtsgericht: Bad Homburg, HRB 10751,
> > USt-Nr.: DE256610065
> > Aufsichtsratsvorsitzender: Burchard Steinbild, Vorstand: Andr?
> > Mindermann (Vorsitzender), Christopher Kuhn, Sabine Riedel
> >
> > Schlanker, schneller und flacher denn je - OTRS 4! Und f?r alle, die
> > MEHR wollen: Entdecken Sie hier die OTRS Business Solution? mit mehr
> > Business Features!
> >
> https://www.otrs.com/otrs-business-solution-fuer-besseren-kundenservice/?lang=de
> >
> >
> > ------------------------------
> >
> > Message: 2
> > Date: Thu, 27 Nov 2014 15:03:27 +0100
> > From: Martin Gruner <[email protected]
> > <mailto:[email protected]>>
> > Subject: [dev] OTRS 5 development
> > To: Development community of OTRS <[email protected] <mailto:[email protected]
> >>
> > Message-ID: <[email protected]
> > <mailto:[email protected]>>
> > Content-Type: text/plain; charset=utf-8
> >
> > Dear OTRS developers,
> >
> > as you might have heard, OTRS 4 is now released and development for
> OTRS
> > 5 will start soon.
> >
> > Do you plan to make substantial contributions to it? If that is the
> > case, I want to offer you to plan and coordinate this together, to
> make
> > sure right from the planning period that your contributions can find
> > their way into OTRS 5.
> >
> > Please just let me know via reply on this list.
> >
> > Thanks and best regards, Martin
> >
> > --
> > Martin Gruner
> > Senior Developer R&D
> >
> > OTRS AG
> > Bahnhofplatz 1a
> > 94315 Straubing
> >
> > T: +49 (0)6172 681988 0 <tel:%2B49%20%280%296172%20681988%200>
> > F: +49 (0)9421 56818 18 <tel:%2B49%20%280%299421%2056818%2018>
> > I: www.otrs.com/ <http://www.otrs.com/>
> >
> > Gesch?ftssitz: Bad Homburg, Amtsgericht: Bad Homburg, HRB 10751,
> > USt-Nr.: DE256610065
> > Aufsichtsratsvorsitzender: Burchard Steinbild, Vorstand: Andr?
> > Mindermann (Vorsitzender), Christopher Kuhn, Sabine Riedel
> >
> > Schlanker, schneller und flacher denn je - OTRS 4! Und f?r alle, die
> > MEHR wollen: Entdecken Sie hier die OTRS Business Solution? mit mehr
> > Business Features!
> >
> https://www.otrs.com/otrs-business-solution-fuer-besseren-kundenservice/?lang=de
> >
> >
> > ------------------------------
> >
> > _______________________________________________
> > dev mailing list
> > [email protected] <mailto:[email protected]>
> > http://lists.otrs.org/cgi-bin/listinfo/dev
> >
> >
> > End of dev Digest, Vol 44, Issue 6
> > **********************************
> >
> >
> >
> > _______________________________________________
> > OTRS mailing list: dev - Webpage: http://otrs.org/
> > Archive: http://lists.otrs.org/pipermail/dev
> > To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
> >
>
> --
> Martin Gruner
> Senior Developer R&D
>
> OTRS AG
> Bahnhofplatz 1a
> 94315 Straubing
>
> T: +49 (0)6172 681988 0
> F: +49 (0)9421 56818 18
> I: www.otrs.com/
>
> Geschäftssitz: Bad Homburg, Amtsgericht: Bad Homburg, HRB 10751,
> USt-Nr.: DE256610065
> Aufsichtsratsvorsitzender: Burchard Steinbild, Vorstand: André
> Mindermann (Vorsitzender), Christopher Kuhn, Sabine Riedel
>
> Schlanker, schneller und flacher denn je - OTRS 4! Und für alle, die
> MEHR wollen: Entdecken Sie hier die OTRS Business Solution™ mit mehr
> Business Features!
>
> https://www.otrs.com/otrs-business-solution-fuer-besseren-kundenservice/?lang=de
> _______________________________________________
> OTRS mailing list: dev - Webpage: http://otrs.org/
> Archive: http://lists.otrs.org/pipermail/dev
> To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev
>
_______________________________________________
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev