Workaround for subtasks to inherit field data?

I have a form that creates a task and in that form I capture details that go into the fields (both standard and custom). Based on the selection, new subtasks are generated using custom rules. However, the field details are not carried over into the subtasks.

How are other users working around this limitation? I don’t think a third-party tool is a good fit for our business due to the sensitivity of our data (i.e., Flowsana or Zapier)

Because our form has about 100 variables, I don’t want to create rules for each variant (i.e., if Request Type = Report, then assign to Bob and update subtask field to Report. If Request Type = Presentation, then assign to Susie and update subtask field to Presentation, etc.) not only because it would take a good deal of time but also wouldn’t account for any changes as we scale.

2 Likes

Fields data from forms will only be carried to the parent task, and not subtasks.

I would need to know more about your process with the form and why would you need to create subtasks, but what I’ve done so far is actually with rules for each variant have a rule that can assign the tasks or subtasks depending on the selection.

I have done this for marketing teams, so tasks get assigned to the right person depending on the type of request that is selected, but I do it from the parent task, and the subtasks generated are more like a checklist of the process they have to run through to complete the request.

I tested once having the custom fields from the parent task be also carried out to subtasks and it can become tricky for some custom fields and it consums too much of the usage of the rules when you are dealing with a form that has too many questions (this was a form with +200 questions), so at the end we decided to stay with the parent task only, so whoever has subtasks assigned are added as collaborators of the parent task and get all details in from the parent task.

Recently what I did for this case, since we can now carry variables to tasks or subtasks description when setting up rules is that when a subtask is needed, I add the field variable in the subtask description, which based on feedback recevied is much better (see bellow image for reference).

image

Try it out, I hope this can give you a solution.

2 Likes

Thank you for your suggestions. I’ll see if the variable data fields might work.

For us, the Fields capture a lot of details from the form (it sounds similar to yours) and it is helpful for the subtasks to include at least parts of that information to drive further assignment details. We have fields that are not filled in by the form submitter but are later added by the Assignee, that can be used to create additional subtasks and approval paths. But the Assignee’s subtasks are blank right now which is causing them to need to fill in the details for each subtask which is less than ideal.

I was thinking that maybe there was a Rule option to duplicate an existing task and then make slight changes. Something like: “IF request is received in Form Submissions THEN duplicate task details AND update assignee to {name}”

1. Utilize Asana’s API

Using Asana’s API can help automate this process. You can create a custom script that:

  • Captures the form details and creates a parent task.
  • Reads the field details from the parent task.
  • Generates subtasks and populates them with the same field details.

Here’s a basic outline of how this can be done using Python:

import requests

# Replace with your personal access token
access_token = 'your_personal_access_token'

# Replace with your workspace ID and project ID
workspace_id = 'your_workspace_id'
project_id = 'your_project_id'

# URL to create a new task
create_task_url = f'https://app.asana.com/api/1.0/tasks'

# Headers for the API request
headers = {
    'Authorization': f'Bearer {access_token}',
    'Content-Type': 'application/json'
}

# Data for creating a new task
task_data = {
    'data': {
        'workspace': workspace_id,
        'projects': [project_id],
        'name': 'Parent Task Name',
        'notes': 'Parent Task Notes',
        'custom_fields': {
            'custom_field_id_1': 'value_1',
            'custom_field_id_2': 'value_2',
            # Add other custom fields here
        }
    }
}

# Create the parent task
response = requests.post(create_task_url, headers=headers, json=task_data)
parent_task = response.json()['data']

# Function to create a subtask
def create_subtask(parent_task_id, subtask_name, custom_fields):
    subtask_data = {
        'data': {
            'parent': parent_task_id,
            'name': subtask_name,
            'custom_fields': custom_fields
        }
    }
    subtask_response = requests.post(create_task_url, headers=headers, json=subtask_data)
    return subtask_response.json()['data']

# Create subtasks with the same custom fields
subtasks = []
for subtask_name in ['Subtask 1', 'Subtask 2']:
    subtask = create_subtask(parent_task['gid'], subtask_name, parent_task['custom_fields'])
    subtasks.append(subtask)

print(f'Parent Task: {parent_task}')
print(f'Subtasks: {subtasks}')

2. Template Tasks

Create template tasks that include all the necessary fields and details. When a new task is created via the form, manually or semi-automatically duplicate the template task and adjust as needed.

3. Asana Rules with Advanced Logic

Even though you mentioned not wanting to create numerous rules, consider if there’s a way to consolidate some rules or use conditional logic more effectively. For example, using a primary custom field that branches into more detailed tasks could reduce the overall number of rules needed.

4. Feedback to Asana

Provide feedback to Asana regarding this limitation. Asana regularly updates its features based on user feedback, and this might prompt them to introduce more robust functionality for handling subtasks and field inheritance in the future.

5. Internal Tool Development

Consider developing an internal tool or lightweight service that bridges this gap without relying on external third-party services. This tool could use Asana’s API to read the parent task details and create subtasks accordingly.

If you provide more specific details about your current setup and constraints, I can help tailor a more precise solution.

1 Like