How to assign relations to child entity on creation?

If a parent and child entity have the same relational field for example: Stories and Subtasks both have a relation to Products. Then when creating Subtasks on a Story card - how do I automatically assign the same Product to the Subtasks that are selected on the Story. Now when creating Subtasks, the Product field is not set at all.

1 Like

It sounds as though Subtasks should use a lookup to inherit the Product from the Story, rather than having a direct relation field to the Product.

1 Like

Thanks @Chr1sG. Could you explain how we should make this choice (between a relation and a lookup), in general?

You can use Lookup field in a Subtask and get project from Story, but only if the Subtask ALWAYS has Story.

If Subtask can live without Story, then lookup will not work. However, we are working on automations and for such scenarios it will be possible to create a rule to set Product automatically for every new Subtask you create.

1 Like

Can the Lookup capability become more complex?

As a general rule (for me anyway) a relation should exist when it is meaningful for the entities to be directly connected. Lookups are about inheriting or inferring information from an existing relation (and is therefore read-only).

So for a simple example, the classic hierarchy of Product → Epic → Feature requires that Features are related to an Epic, and Epics are related to a Product. There’s no reason why you would create a relationship from Feature to Product, since it can be ‘inherited’ from the Epic.
If you need to have a board where all Features are grouped according to their Product, then a lookup works fine. Although it won’t be possible to drag the Features from Product A to Product B, that’s actually quite logical, since a Feature needs to belong to an Epic - if you drag to Product B, which Epic should it belong to?

2 Likes

That makes sense. So how do I configure a sprint planning board with sprints as columns and projects as rows - that includes userStories grouped on project according to it´s “feautre product lookup”?

It depends on how your types are currently related.
Assuming that you have a hierarchy of Project → Feature → User stories and you also have Sprint → User stories
image
then you could try it like this:

image

Here’s the app:

I have features in a separate app with a relation to userStories. Otherwise I have the same setup.
The issue with this is that userStories that are not assigned to a project (only looked up by it’s parent) are not grouped with the associated project. Hence the need to automatically assign UserStories to the same project as it’s parent on creation. Or is there a way to group rows by lookup reference?
When planing sprint you intuitively what userStoris grouped by its corresponding projekt and doing this manly for every userStroy is time consuming.
One workaround I found its to assign UserStories on a Project list and configure filter to only show that project. Automation for this would be great to have.

Yes.
You can use lookups as the row grouping (or column grouping for that matter) in just the same way as is possible with relations.

1 Like

That makes sense. So how do I configure a sprint planning board with sprints as columns and projects as rows - that includes userStories grouped on project according to it´s “feautre product lookup”?

Sorry, I don’t know what you mean by