Dynamic Field in Service

Moderator: crythias

Locked
Gonzalo
Znuny newbie
Posts: 75
Joined: 06 Nov 2013, 19:20
Znuny Version: 5.0.8
Real Name: Gonzalo

Dynamic Field in Service

Post by Gonzalo »

Hi!

I created a dynamic Field called "expiration date", that i want to add in Action=AdminService;Subaction=ServiceEdit;ServiceID=NEW, to know when the service is expired. So I try to search any file like "NewService:" to add this dynamic field. My doubt is that I don't know what file I have to modify.

Other times I used dynamic fields for tickets, notes, CMDB, but for this case I don't know what file inside the sysconfig I should modify to add dynamic field or if it is impposible to do that.

Thanks in advance.
Last edited by Gonzalo on 06 Feb 2015, 15:57, edited 1 time in total.
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database

---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
Gonzalo
Znuny newbie
Posts: 75
Joined: 06 Nov 2013, 19:20
Znuny Version: 5.0.8
Real Name: Gonzalo

Re: Dynamic Field in Service

Post by Gonzalo »

I try to follow this post: viewtopic.php?f=62&t=28003&p=113021&hil ... ce#p113021 but I try to add a Date / Time dynamic field but with no success. I attach the code that i wrote in config.pl and If someone find any error please help me.

Code: Select all

	$Self->{'ServicePreferences'}->{'Fecha2'} =  {
		  'Block' => 'Date / Time',
		  'Desc' => 'Fecha Final Servicio',
		  'Label' => 'Fecha2',
		  'Module' => 'Kernel::Output::HTML::ServicePreferencesGeneric',
		  'PrefKey' => 'Fecha2',
		  'DefaultValue' => '0',
		  'YearsPeriod' => '1',
		  'YearsInPast' => '0',
		  'YearsInFuture' => '4',
		 };
		 
Thanks
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database

---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Dynamic Field in Service

Post by crythias »

why do you need a date/time addition to what's essentially a label?
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
Gonzalo
Znuny newbie
Posts: 75
Joined: 06 Nov 2013, 19:20
Znuny Version: 5.0.8
Real Name: Gonzalo

Re: Dynamic Field in Service

Post by Gonzalo »

Hi crythias!

I need a field to know when the service is out of date. For example if I have created a new service for one customer for 2 years, I would like to set a date to control wheter is still valid or not.

Thanks!
OTRS 5.0.8 with Oracle Linux Server release 7.1 with MariaDB database

---------------------------------------------------------
OTRS 3.3.6 on Centos 6.0 with MySQL database
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Dynamic Field in Service

Post by crythias »

The service should be Generic and not per customer. but if you'd push me to it, I'd probably use ideas from After Hours Auto Reply (changing the idea from AutoReply to Service). however instead of cron, I'd use the linux command "at".
http://www.ibm.com/developerworks/libra ... cheduling/

or

Code: Select all

man at
Look at otrs/bin/otrs.AddService.pl for an example of how the API is called to manipulate the service.

The overall concept:
at (time in the future) Remove Service from Customer/Disable service
optionally,
at (time in the future, less 30 days?) send email to Customer indicating expiration.

Note that atq will list the at jobs and atrm will delete them.
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
Locked