Page 1 of 2

"Diff Hours" Type Field Error

Posted: 06 Sep 2018, 20:32
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

Re: "Diff Hours" Type Field Error

Posted: 06 Sep 2018, 21:10
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

Re: "Diff Hours" Type Field Error

Posted: 06 Sep 2018, 21:16
by support
Can you explain me why we need Prefix/Suffix for this field type?

Re: "Diff Hours" Type Field Error

Posted: 06 Sep 2018, 22:35
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

Re: "Diff Hours" Type Field Error

Posted: 06 Sep 2018, 23:50
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

Re: "Diff Hours" Type Field Error

Posted: 07 Sep 2018, 11:11
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

Re: "Diff Hours" Type Field Error

Posted: 07 Sep 2018, 11:45
by support
I see, replace attached file to includes\classes\fieldstypes\
Now you can configure number format.
Is it ok now?

Re: "Diff Hours" Type Field Error

Posted: 07 Sep 2018, 13:24
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

Re: "Diff Hours" Type Field Error

Posted: 07 Sep 2018, 13:41
by support
Ok, clear.
Replace attached file includes\classes\fieldstypes\ieldtype_hours_difference.php
and unpack archive to css/ folder
then ctr+f5

Re: "Diff Hours" Type Field Error

Posted: 07 Sep 2018, 14:39
by elviseras
Now is perfect Sergey!!

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