Database Structure Challenge - Project Templates

Hey guys, I’m hung up on a challenge I’m having with my database structure around creating project templates.

The way I have it set now a project template is just a project data type, and when I use it, I just clone it.

One of the functions I would like, is to be able to templatize task assignments. It looks like this on the template “This task is assigned to the projects designer”

Then, on the project side, when the designer is assigned to the project, it reassigns the tasks to that designer, which is a user type.

The way I have “Hacked” this is that I created a data field on project for each of the project roles I want (Writer, Designer, Director etc)

Then I have a data type called project roles with matching name values. On the back end, when a task is created from template, it does this “Assign this task to the director only if the task templates assigned roles name is director” I do this for each role.

This is not very saleable because I have to hard code each role to the project data type.

I can’t see how I can dynamically set the project role for the tasks in advance, and then have it linked to the projects project roles in the future.

Thanks in advance.

One idea I’m mulling is when the project is cloned, I can clone the templates list of project roles and the tasks go through a recursive workflow to be cloned, I can do something like “Search the new projects roles by name for the role that matches this tasks template”

Then each project role in my database would be it’s own thing - every project would have a unique set of roles with a user field.