Create a new field

Moderator: crythias

Locked
ovr
Znuny newbie
Posts: 10
Joined: 02 Jun 2017, 23:43
Znuny Version: otrs5s

Create a new field

Post by ovr »

Hello everybody,

I am trying to create a field similar to Accounted time, but to control the number of kilometers that my techs are doing.

I have managed to create the Dynamic field and it shows to input the number of kilometers when i am adding a note to the Ticket, but now i need to have a calculation of the total amount of kilometers in the ticket formation box.

Which fields should i configure for this info to be presented.

I am currently using OTRS 6.0.26.

Thank you very much !
zzz
Znuny superhero
Posts: 914
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: Create a new field

Post by zzz »

Hello,

That won't work without making changes to the code.
Accounted time is not a normal dynamic field. It is using its own table (time_accounting).

Best regards
Emin
Professional Znuny and OTRS services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
ovr
Znuny newbie
Posts: 10
Joined: 02 Jun 2017, 23:43
Znuny Version: otrs5s

Re: Create a new field

Post by ovr »

Hello Emin,

Thank you for the quick reply.

Since its not possible to add the field to the ticket information, is there any way to actually control for one ticket the amount of km's (in this case) ?

Or if you have another suggestion, or think there's a better way to do this , i would appreciate it a lot.

Thank you !
wurzel
Znuny guru
Posts: 3273
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Create a new field

Post by wurzel »

Hi,

you can manually edit the field and calculate manually.

You can use local webservices for calculating - may need development or (commercial) modules

You can use commercial module for dynamic field type calculation AFAIK.

Flo
OTRS 2025 SILVER (Prod)
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
zzz
Znuny superhero
Posts: 914
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: Create a new field

Post by zzz »

ovr wrote: 21 Feb 2020, 11:28 Since its not possible to add the field to the ticket information, is there any way to actually control for one ticket the amount of km's (in this case) ?
You can show the field in "Ticket Information", that's not the problem; just add the field to 'Ticket::Frontend::AgentTicketZoom###DynamicField'
You could show the KM field in every action and your agents would have to calculate the new sum by themselves...

It would be 'pretty' easy to implement that in JavaScript. Maybe you have someone in your company that can help you out with it.

Best regards
Emin
Professional Znuny and OTRS services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
root
Administrator
Posts: 4251
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Create a new field

Post by root »

zzz wrote: 21 Feb 2020, 13:48 You could show the KM field in every action and your agents would have to calculate the new sum by themselves...

It would be 'pretty' easy to implement that in JavaScript. Maybe you have someone in your company that can help you out with it.
For what is Javascript needed it the agent's calculate by themself and update the existing field?
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 ?
zzz
Znuny superhero
Posts: 914
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: Create a new field

Post by zzz »

root wrote: 21 Feb 2020, 16:35
zzz wrote: 21 Feb 2020, 13:48 You could show the KM field in every action and your agents would have to calculate the new sum by themselves...

It would be 'pretty' easy to implement that in JavaScript. Maybe you have someone in your company that can help you out with it.
For what is Javascript needed it the agent's calculate by themself and update the existing field?
My bad, badly written.
JavaScript refers to the auto calculation.

Best regards
Emin
Professional Znuny and OTRS services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
skullz
Znuny superhero
Posts: 658
Joined: 24 Feb 2012, 03:58
Znuny Version: LTS and Features
Real Name: Mo Azfar
Location: Kuala Lumpur, MY
Contact:

Re: Create a new field

Post by skullz »

For calculation, you may want to refer Generic Agent and execute custom module.. Afraid, this require programming skill.
My Github
OTRS CE/LTS Discord Channel
Cant Update Package Anymore ? Check This

Professional OTRS, Znuny & OTOBO services: efflux.de/en
Free and premium add-ons: English
ovr
Znuny newbie
Posts: 10
Joined: 02 Jun 2017, 23:43
Znuny Version: otrs5s

Re: Create a new field

Post by ovr »

Hello all,

Thank you for the replies.

I will try for now at least to have the information displayed, the auto calculation can be for a later change.

Once again thank you all.

Best regards !
Locked