Appending the User story subject to a task subject

If a task is being created I would like to add the user story subject as a suffix to the task subject.

If would be somewhere in here Adding the id as a prefix of the title of a created elements I imagine. Where the task would reference the user story subject.

I’m asking how to find the user story when a task subject is being updated.

In Taiga a task already has a user_story field containing the related user story ID. On task create/update, read that ID from the task payload (or fetch the task), then fetch the user story and use its subject as your suffix. If you are writing a webhook or extension, do the lookup at that point rather than trying to infer it from the task subject. Guard against loops by only appending when the suffix is not already present.