"Diff Hours" Type Field Error

User avatar
elviseras
Investor
Investor
Posts: 578
Joined: 08 Feb 2017, 03:16
Name: Elvix Sampedro
Location: Galicia - Spain
Company Name: novaTEK

"Diff Hours" Type Field Error

Post by elviseras »

Hi Sergey,

I do not know if it is a bug of the new "Diff Hours" field type in version v2.3 or if it's a new MySQL config problem, but I post it here looking for help and because this trouble can happen to other users...

When registering a new field of the type "Difference of hours" gives me the error that can be seen in the image below to list the field data:

regards
elviseras
Attachments
Hours_difference_error.png
Hours_difference_config.png
User avatar
elviseras
Investor
Investor
Posts: 578
Joined: 08 Feb 2017, 03:16
Name: Elvix Sampedro
Location: Galicia - Spain
Company Name: novaTEK

Re: "Diff Hours" Type Field Error

Post by elviseras »

Hi again and Sorry!!, It seems that I have already solved the problem!!!... In MySQL config file I have configured the following value:
thread_stack = 256K
Note that the following is recommended:
32bits Server: thread_stack = 128K
64bits Server: thread_stack = 256K

Now the new type of "Diff" type field seems works perfectly, but should have, but it should have the same formatting options as the other numeric fields (Number format, Prefix, etc)....See image below
Diff_Type_Options.png
regards
elviseras
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: "Diff Hours" Type Field Error

Post by support »

Can you explain me why we need Prefix/Suffix for this field type?
User avatar
elviseras
Investor
Investor
Posts: 578
Joined: 08 Feb 2017, 03:16
Name: Elvix Sampedro
Location: Galicia - Spain
Company Name: novaTEK

Re: "Diff Hours" Type Field Error

Post by elviseras »

Yes!! Because we use several time fields for extract statistics on users performance in tasks and tickets, and comparing SLA times with other time values. In some instances we use days and in others we use hours or other values.

As you can see in the image, it is not consistent that the columns have different format ..
SLAvsDTime.png
regards
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: "Diff Hours" Type Field Error

Post by support »

Ok, prefix and suffix is easy to add and I have added it. Unpack archive to includes\classes\fieldstypes\
Let me know if it works ok.
This change will be included in 2.3
Attachments
fieldstypes.zip
(4.49 KiB) Downloaded 231 times
User avatar
elviseras
Investor
Investor
Posts: 578
Joined: 08 Feb 2017, 03:16
Name: Elvix Sampedro
Location: Galicia - Spain
Company Name: novaTEK

Re: "Diff Hours" Type Field Error

Post by elviseras »

Ok, Prefix/Sufix Config already works, but even more important to us is to be able to configure the "Number Format" option, because as I commented there are inconsistencies in list numbers view (Especially in average values calculation). See right column in new image below...
SLAvsDTime_new.png
regards
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: "Diff Hours" Type Field Error

Post by support »

I see, replace attached file to includes\classes\fieldstypes\
Now you can configure number format.
Is it ok now?
Attachments
fieldtype_hours_difference.php
(8.12 KiB) Downloaded 283 times
User avatar
elviseras
Investor
Investor
Posts: 578
Joined: 08 Feb 2017, 03:16
Name: Elvix Sampedro
Location: Galicia - Spain
Company Name: novaTEK

Re: "Diff Hours" Type Field Error

Post by elviseras »

Now, it´s better, but still there are some differences:

1.- In rows, data should be aligned to the right (However in total / average lower cell it's fine)
2.- In rows, decimals aren't show if the number is integer (However in total / average lower cell it's fine)

You can see the difference in the image. First column (left) is a formula field, Second column (right) is diff hours field..
SLAvsDTime_new2.png
They should have identic number formats

PD.- As an additional suggestion for the future, it would be good if in numerical fields cells you had the option of show blank cell (or empty) when the result to be displayed is (0) zero

regards
User avatar
support
Site Admin
Posts: 6215
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: "Diff Hours" Type Field Error

Post by support »

Ok, clear.
Replace attached file includes\classes\fieldstypes\ieldtype_hours_difference.php
and unpack archive to css/ folder
then ctr+f5
Attachments
default.zip
(6.87 KiB) Downloaded 236 times
fieldtype_hours_difference.php
(8 KiB) Downloaded 277 times
User avatar
elviseras
Investor
Investor
Posts: 578
Joined: 08 Feb 2017, 03:16
Name: Elvix Sampedro
Location: Galicia - Spain
Company Name: novaTEK

Re: "Diff Hours" Type Field Error

Post by elviseras »

Now is perfect Sergey!!

Thank you very much for your quick support, as always :D :D
Post Reply