Adding Incremental Number to Tasks Module

Hi guys,

i am attempting to add automatic numbering in tasks and have it display in the display list.

l’ve spent like 10hrs or more on this issue and no luck so far. l’ve tried:

a) https://w.opensourceawards.org/forum/suitecrm-7-0-discussion/3612-please-help-with-adding-numbers-to-new-tasks

i repair / rebuilt the database and no auto increment field was displayed. i also changed the values in the database to auto increment and still nothing

b) http://www.sugarcrmcolombia.com/produccion/wiki/?p=29

i also tried adding this code into the suggested location, rebuild and repaired the database and again nothing.

c)https://github.com/shauncollopy/dtg-autoincrement

i tried loading this module but the module installer came up blank and shows no modules installed.

Nothing works.

Can anyone kindly assist? thanks

Hi curious,

[quote]l’ve tried:

a) w.opensourceawards.org/forum/suitecrm-7-...numbers-to-new-tasks[/quote]

This link doesn’t work.

As a suggestion: are you sure you copied Vardef files to the right directory? A common mistake is to put them

custom/modules/<module>/Ext/Vardefs

instead of

custom/Extension/modules/<module>/Ext/Vardefs

Did you check the apache/nginx error log?

/var/log/httpd_error.log
/var/log/apache2/error.log

hey thanks for getting back to me.

  1. Yes i have copied the vardef files to the correct directory:

  2. regarding the module install, all i get is ZIP Error(0): Status(0): Arhive(upload://dtg-autoincrement-master.zip): Directory(/tmp/rrXCV3)

i flushed the error logs and then proceeded to load the modules and got nothing in the error logs:

root@botox:/var/log/apache2# echo > aircon.error.log
root@botox:/var/log/apache2# cat aircon.error.log

root@botox:/var/log/apache2# ls /tmp

  1. https://suitecrm.com/community/forum/suitecrm-7-0-discussion/3612-please-help-with-adding-numbers-to-new-tasks

i followed the above instructions but i still get a blank for the task numbers

and my tasknumber is already set as autoincrement:

mysql> show columns from tasks_cstm;
±-------------±---------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±-------------±---------±-----±----±--------±---------------+
| id_c | char(36) | NO | | NULL | |
| tasknumber_c | int(255) | NO | PRI | NULL | auto_increment |
±-------------±---------±-----±----±--------±---------------+
2 rows in set (0.00 sec)

mysql>

Hi curious,

Can you verify the table contents in mysql to see if the fields are really empty?

select * from tasks_cstm;

If they are not empty, then I suspect that the referenced field in the list view does not correspond to the custom field that you created. You may try to

  • go into studio
  • remove the field from the list view
  • close studio
  • reopen studio
  • add the field to the list view

The zip file you downloaded contains more than just the module and is not the installable module itself.

When you extract it contains a parent folder dtg-autoincrement-master

To be able to install the module, you can create create the installable module by creating zip file of the files/dirs: SugarModules, LICENSE.TXT, manifest.php, README.TXT
making sure to omit the parent folder.

PS: the code solution you implemented should have created the field in the table tasks, not in the table tasks_cstm. Did you also add it by studio?

I assume that you now have tasknumber twice: in the tasks table as well as in the tasks_cstm table.

Seems the same discussion is going on in another post.
Try the DTG autoincrement module

https://suitecrm.com/forum/suitecrm-7-0-discussion/1841-how-to-add-a-autoincrement-field-for-account-and-contacts?start=15#18081