Hi Jerome - welcome to the forums!
How that task field is populated depends a bit on how you run the Publisher. When you run the Publisher in standalone mode (eg, straight from Desktop) or in a basic setup, you have to manually specify the task, as Toolkit can’t figure it out from the context.
When you’re in an advanced setup and running the Publisher within a DCC (Maya, Nuke, etc.), the running Toolkit engine knows your context – who you are, what entity you’re working on, and which task on the entity – so when you publish, it sets the task automatically on the PublishedFile based on this info.
I’m guessing in your case that you’re running the Publisher within a DCC and relying on Toolkit to set the task, and I’m also guessing that the task is not being set correctly, possibly because of the change you made to the template. If this is the case, I’ll want to get some information from you about your pipeline configuration and logs, so we can continue the conversation in a private channel, then report back here for posterity when we’ve figured it out.
As a start, if this is the case, it would be helpful to see a log. Can I have you enable debug logging, reproduce the a bad publish, and send a copy of your log file from the appropriate directory for your operating system to firstname.lastname@example.org, referencing this post? The name of the log will be
<ENGINE> is the name of the DCC you’re running the Publisher in (eg,
, tk-maya.log, etc.).