Timestamp with dynamic field

Moderator: crythias

Post Reply
Gabor
Znuny newbie
Posts: 14
Joined: 01 Jul 2013, 13:41
Znuny Version: 3.2.7
Real Name: Gabor

Timestamp with dynamic field

Post by Gabor »

Hello crythias,

I have a simple question about timestamps: is there a way to insert a timestamp with a special marker into History or using the Date /Time dynamic field to be activated by another field (ACL?) and save the current timestamp in the ticket?

We have different SLA-s and Escalations than OTRS but we managed to implement all of them except one. I've added a Date/Time dynamic field to save the timestamp manually but is there a way set it automatically? Is it possible to just place a timestamp based on an (ACL) event or setting the dynamic field to be activated automatically? I've tried ACL-s and Generic Agent as well but eg. in gen. agent you cannot tick the box for the date/time without setting a time (I don't want to set a time I want to use the timestamp) and with ACL-s I cannot give the 'checked' value to the field and I am not sure I can use dynamic fields as "Possible" and "White list" as well?
Image
Here I've to dynamic fields: a dropdown and a Date/Time field and I want to tick the checkbox with the current time when the 'Inital result' option is selected. Or place a timestamp in history as 'Initial result: time/date'
Is it possible?
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Timestamp with dynamic field

Post by crythias »

Gabor wrote:is there a way to insert a timestamp with a special marker into History or using the Date /Time dynamic field to be activated by another field
Yes. Javascript can be helpful.

ACL happens (roughly) before anything else and is based, again, roughly, on what the database knows of the current ticket.
ACL also happens when you change *some* variables, but only in a limiting factor of what values are available to a control for a given criteria. It doesn't *set* information, but Javascript does.

the pseudo-code is:
onchange (or onmouseup?) of master control, set xx...

Now, by *default?* (I may be wrong in this, because I've changed it so many times, but...) by default, the field won't show up unless it's enabled for a screen. If it's not required, it should (?) still be populated with "now" vs offset, but there might be a checkbox preceding that Dynamic field which is referenced by DynamicField_myfieldnameUsed (a checkbox)
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
robotcop
Znuny newbie
Posts: 6
Joined: 10 Apr 2015, 12:49
Znuny Version: OTRS4

Re: Timestamp with dynamic field

Post by robotcop »

Hi,

I am newbie to OTRS. I have no clue how to set the current datetime as the default value of a Dynamic field thru the GUI (Ticket -> Core::TicketDynamicFieldDefault). Any idea?


Thanks.
OTRS 4 on Linux with MySQL database.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Timestamp with dynamic field

Post by crythias »

Hi robotcop, welcome to the OTRS/Otterhub forum. Please take a moment to adjust your signature and read my Need help? link in my signature.

You are encouraged to begin questions in new threads. Note that DynamicField date fields tend to have "now" as the default simply by virtue of display, but they don't get applied unless checked. If you encounter different to this, please provide screenshots, etc.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
robotcop
Znuny newbie
Posts: 6
Joined: 10 Apr 2015, 12:49
Znuny Version: OTRS4

Re: Timestamp with dynamic field

Post by robotcop »

Hi crythias,

Noted with thanks. I will post my question in new thread with more in detail.
OTRS 4 on Linux with MySQL database.
duka
Znuny newbie
Posts: 2
Joined: 24 Sep 2018, 04:39
Znuny Version: otrs6

Re: Timestamp with dynamic field

Post by duka »

crythias wrote: 29 Oct 2013, 19:15
Gabor wrote:is there a way to insert a timestamp with a special marker into History or using the Date /Time dynamic field to be activated by another field
Yes. Javascript can be helpful.

ACL happens (roughly) before anything else and is based, again, roughly, on what the database knows of the current ticket.
ACL also happens when you change *some* variables, but only in a limiting factor of what values are available to a control for a given criteria. It doesn't *set* information, but Javascript does.

the pseudo-code is:
onchange (or onmouseup?) of master control, set xx...

Now, by *default?* (I may be wrong in this, because I've changed it so many times, but...) by default, the field won't show up unless it's enabled for a screen. If it's not required, it should (?) still be populated with "now" vs offset, but there might be a checkbox preceding that Dynamic field which is referenced by DynamicField_myfieldnameUsed (a checkbox)
I tried a lot to tick the checkbox from any position in Kernel folder(.pm .tt), didn't work. Where is editable that parameter?
Post Reply