[SOLVED] Add events in calendar by SQL

Moderator: crythias

Post Reply
Rick
Znuny newbie
Posts: 57
Joined: 30 Apr 2015, 09:24
Znuny Version: 4.0.7

[SOLVED] Add events in calendar by SQL

Post by Rick »

Hello,

I want to add an events in the calendar of the dashboard.
I add in the table dynamic_field_value by INSERT INTO with correct values but the ticket is not in the calendar.
Can i do this ?

Thanks
Last edited by Rick on 11 Jun 2015, 10:02, edited 1 time in total.
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Add events in calendar by SQL

Post by RStraub »

Adding dynamic field values will not suffice. You'll need:
- a ticket
- in the specified queue
- with start and ending values in the specified dynamic fields

If you need to do it "outside of the webfrontend", rather use the generic interface to create a proper ticket.
Fiddling with the db is something I wouldn't recommend.
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
Rick
Znuny newbie
Posts: 57
Joined: 30 Apr 2015, 09:24
Znuny Version: 4.0.7

Re: Add events in calendar by SQL

Post by Rick »

I have the ticket, so i use the ticket_id. How can i use the generic interface ?
Rick
Znuny newbie
Posts: 57
Joined: 30 Apr 2015, 09:24
Znuny Version: 4.0.7

Re: Add events in calendar by SQL

Post by Rick »

What i wand to do : create automatically two dynamic fields when the state of a ticket change to pending reminder.
I want to use the same value for EventsStart and EventsEnd with the date of pending reminder, for show in one box (day of reminder).
Sorry for the shitty English, I'm French :lol:
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Add events in calendar by SQL

Post by RStraub »

Allright. In that case I would suggest to write a custom module which is triggered on StateUpdate and filtered to pending reminder.

If it is triggerd, it reads the reminder date and sets the values to the two fields which you configured in SysConfig.
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
Rick
Znuny newbie
Posts: 57
Joined: 30 Apr 2015, 09:24
Znuny Version: 4.0.7

Re: Add events in calendar by SQL

Post by Rick »

I has made a trigger with mysql for insert into the table dynamic_field_value but i think it miss something because my ticket not appear in the calendar whereas the other since the form are visible
Rick
Znuny newbie
Posts: 57
Joined: 30 Apr 2015, 09:24
Znuny Version: 4.0.7

Re: Add events in calendar by SQL

Post by Rick »

There an other table to update ?
root
Administrator
Posts: 3968
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Add events in calendar by SQL

Post by root »

The recommendation was to use OTRS's event to trigger the update to the two dynamic fields.
But to answer your question: is this ticket you talk about in one of the queue you've configure to be shown in the calendar?
That's the code where the relevant ticket search ist done: https://github.com/OTRS/otrs/blob/maste ... ar.pm#L118
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
Rick
Znuny newbie
Posts: 57
Joined: 30 Apr 2015, 09:24
Znuny Version: 4.0.7

Re: Add events in calendar by SQL

Post by Rick »

Oh yess !
I found the solution in other post in deutsch : viewtopic.php?t=25496

Thanks bro'
Post Reply