Jira-style task naming

I would like to auto-name tasks with a short code from the project associated with that task, somewhat like Jira does it.
I’ve added a mandatory “project_code” field to the Project doctype.
I’ve also made the Project link field mandatory in the Task doctype.
I would like to do something like:

template:{project.project_code}-{####}

But of course that doesn’t work, because the Task does not have access to the fields inside of the linked Project.

Is there a way to access the fields for Link field types in a form or when generating a name?

1 Like

I think is doable with controller naming.

https://frappeframework.com/docs/v13/user/en/basics/doctypes/naming#by-controller-method

Hope this helps.

3 Likes