Custom Fields

Discussion forum about Anuko Time Tracker
Post Reply
rvgulik
Posts: 3
Joined: Thu May 15, 2014 7:13 pm

Custom Fields

Post by rvgulik » Tue May 20, 2014 7:54 am

Hi,

I've seen a couple of topics about adding custom fields, i really would like the possibility to add additional custom fields.
Is this possible? Is it possible that somebody at anuko could program this into the time tracker?
Maybe make it an paid option or so, i am willing to pay for these kind of upgrades.

Please let me know.

admin
Posts: 546
Joined: Fri Oct 08, 2004 9:46 pm
Location: Vancouver, Canada
Contact:

Re: Custom Fields

Post by admin » Fri May 23, 2014 7:29 pm

One potential complication is reporting, in case you want to be able to filter reports by additional custom field options, and also group by them.

phpboy
Posts: 2
Joined: Mon Oct 28, 2013 1:29 pm

Re: Custom Fields

Post by phpboy » Tue Aug 05, 2014 12:29 pm

Multiple custom fields are possible. Been meaning to develop 'official' code for this and have it put into a stable release.
Give me a shout if you are a developer and I can run you through the theory.

admin
Posts: 546
Joined: Fri Oct 08, 2004 9:46 pm
Location: Vancouver, Canada
Contact:

Re: Custom Fields

Post by admin » Sun Aug 10, 2014 5:06 pm

phpboy wrote:Multiple custom fields are possible. Been meaning to develop 'official' code for this and have it put into a stable release.
Give me a shout if you are a developer and I can run you through the theory.
Feel free to send in / post your modifications. Thanks.

church
Posts: 2
Joined: Wed Nov 12, 2014 1:15 am

Re: Custom Fields

Post by church » Wed Nov 12, 2014 1:35 am

Would love to see code diff for adding few more custom fields aswell, or at least for one that might serve as reference/sample of all the code that needs to be extended. Single custom field is lacking, as we need to differentiate/group tasks by much more criterias, then clients/projects/activities/extra just one field.

cng
Posts: 3
Joined: Thu May 21, 2015 1:53 am

Re: Custom Fields

Post by cng » Thu May 21, 2015 3:59 pm

Did anyone find a sample of code needed to add additional custom fields? I also need these fields to show up in reporting for export. I am not a developer, so any help would be appreciated so I can pass the info along to my developers to tell them what to do for me. Thank you!

peter
Posts: 75
Joined: Sat May 29, 2010 2:06 pm

Re: Custom Fields

Post by peter » Fri May 22, 2015 1:08 am

cng wrote:Did anyone find a sample of code needed to add additional custom fields? I also need these fields to show up in reporting for export. I am not a developer, so any help would be appreciated so I can pass the info along to my developers to tell them what to do for me. Thank you!
Additional custom fields, if done properly, is not a trivial coding effort. One needs to write a lot of code, and refactor existing parts (such as reporting, exports to csv / xml, migration between servers, etc.). Just to let you know that it touches a lot of other parts, which need to be taken care of. So, if you are doing it in house, I suggest that you start with the most recent code base and try to design a simple, generic solution, not forgetting about the above mentioned things, with hope to integrate it into the official project. Reporting is probably the most complex among them. Currently, the only custom field is done as a CustomFields.class.php in plugins dir, reflecting an early approach. Perhaps it needs to be re-designed, if you go from 1 custom field to, say, 3, 5, or 10, and wish to add additional types.

narvind
Posts: 2
Joined: Tue Feb 23, 2016 12:40 pm

Re: Custom Fields

Post by narvind » Wed Feb 24, 2016 10:55 am

Has anybody implemented multiple custom fields?

Am not a php expert but tried to implement multiple custom fields by cloning the existing code (fields[1] to fields[5], chcf_1 to chcf_5, cf_1 to cf_5, cl_cf_1 to $cl_cf_5, etc).

Result: Data for the five additional custom fields gets stored in database but there is a problem in reports.

Custom fields are getting displayed row-wise instead of column-wise

Snapshots attached. I will share the code if someone is willing to debug this.
3.jpg
Report Output
3.jpg (170.89 KiB) Viewed 3676 times
PS: Am not a php expert...
Attachments
1.jpg
Time log
1.jpg (130.4 KiB) Viewed 3676 times
2.jpg
Reports
2.jpg (101.34 KiB) Viewed 3676 times

jmarrero
Posts: 2
Joined: Fri Jan 27, 2017 3:47 pm

Re: Custom Fields

Post by jmarrero » Thu Jun 15, 2017 3:49 pm

Hello Narvind,

We you able to get multiple custom fields to work?
I trying to accomplish the same task as well.

thanks

Uashbjo
Posts: 13
Joined: Tue Oct 24, 2017 9:41 pm

Re: Custom Fields

Post by Uashbjo » Wed Oct 25, 2017 4:32 pm

Hi narvind,

Could you share the code? Did it evolve since your last post?

Thank You!

Post Reply