I am using the Project Template Module.
Everything is working fine.
2 Questions
I created an extra field for Project Template Tasks, how can I map that extra field to Project Tasks so that the value gets populated across when creating a new Project from the template?
I would like to add Project Tasks Activities to the Template function and have the individual activities come across from the template as well. Is this possible?
You cant do either of those things without custom coding I’m afraid.
For question 1 this is relatively easy, you would just add the extra field to the while loop in modules/AM_ProjectTemplates/controller.php starting after line 78.
Question 2 is not as simple and you would really need to know what your doing with php and Suite’s relationships framework to be able to achieve it.
Yes, thats right, think of them as Sub Tasks.
Call, task, doesnt really matter. Once the functionality is working I can simply add the required fields to the existing code mapping like for Q1
Ok in modules/AM_ProjectTemplates/controller.php line 62 replace
SELECT * FROM am_tasktemplates
WHERE id
IN (
SELECT am_tasktemplates_am_projecttemplatesam_tasktemplates_idb
FROM am_tasktemplates_am_projecttemplates_c
WHERE am_tasktemplates_am_projecttemplatesam_projecttemplates_ida = '".$template_id."'
AND deleted =0
)
AND deleted =0
ORDER BY am_tasktemplates.order_number ASC
with this
SELECT *
FROM am_tasktemplates
JOIN am_tasktemplates_cstm ON am_tasktemplates.id = am_tasktemplates_cstm.id_c
WHERE id
IN (
SELECT am_tasktemplates_am_projecttemplatesam_tasktemplates_idb
FROM am_tasktemplates_am_projecttemplates_c
WHERE am_tasktemplates_am_projecttemplatesam_projecttemplates_ida = '".$template_id."'
AND deleted =0
)
AND deleted =0
ORDER BY am_tasktemplates.order_number ASC
Unfortunately I don’t have time to do all of this for you. You could try doing it yourself using the example already in the controller.
You would need to add your relationships to both task templates and project templates in studio then in the controller within the while loop get the relationships you want for each task template and store them in an array.
After line 115 $project_task->save(); you will see relationships being added, you will have to add your relationships the same way.