Help

Automating predecessor/succesor tasks based on order number

Solved
Jump to Solution
761 8
cancel
Showing results for 
Search instead for 
Did you mean: 
haileyfleury
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello,

I need help setting up an automation that links records in a "dependencies" field to a predecessor/successor record (determined by order number). The goal is to automate tasks to hit contributors dashboard when its their turn to work on the project. We have a Projects, Tasks, Content Type and Templated Steps boards that ive set an extension to generate a specific task list based on the type of content. I can edit the extension code to include the dependencies field and set those are part of the template, but the problem is that many project managers use this as a starting point and edit the task list manually, adding or subtracting tasks for their specific need. If a project manager edits the task list, they have to manually manipulate the dependencies field using the gantt view, which is cumbersome and manual. id like to set a way for the field to automatically update based on the task order. 

So the trigger I have in place is "when record is updated"- on the task board, so that if anyone does manipulate the tasks it will still link automatically. I just cant figure out how to link the record to whatever the previous record is (based on order number). Any help would be greatly appreciated!

1 Solution

Accepted Solutions
haileyfleury
5 - Automation Enthusiast
5 - Automation Enthusiast

Thank you for sharing! While this isnt the solution I ended up using, I may not have figured it out without this info so i appreciate your help! I ended up creating an automation that relied on a formula field that was {order#}-1 and pulled in the previous task. If a PM wants to add their own spin on a project (through tasks) they simply wipe the order numbers, manually enter in whatever order is best for them and hit a button "create dependencies", which links the tasks together using the same logic of the formula field. 

See Solution in Thread

8 Replies 8

Hmm, when you say "Order number", does this mean you have a field that has a number that gets updated whenever a task gets added or deleted?

Say you have Task A, B, C, and D and they have an "Order Number" of 1, 2, 3, 4

If a user deletes Task B, do they then manually update Task C's "Order Number" to "2" and Task D's "Order Number" to "3"?

haileyfleury
5 - Automation Enthusiast
5 - Automation Enthusiast

Your are understanding correctly but currently, no the numbers do not reorder themselves automatically. If someone deletes "3" the steps jump from 2 to 4 (but stay in correct order) If someone wants to add a task they will need to add an order number (and change subsequent other task order#s) for the list to appear correctly. How would i set it up to reorder automatically? This might be the first step in getting the dependencies working automatically.

Ah okay.  Hmm, question, would you be alright with a flow where:
1. The project manager is forced to use a single view where they manage the tasks for a specific project
2. They delete, add, reorder items as they want, resulting in a view where the tasks are in sequential order
3. They click a magic button that will then link each record to the next, i.e. Record 1 gets linked to Record 2, Record 2 gets linked to Record 3, etc

If you're okay with this, this would require a script but would be (relatively) simple to do

If you're not okay with this, perhaps you could tell me of another flow that you would be alright with?

I realize that it looks like I'm not answering your questions and I apologize for that.  I was trying to think of how we could accomplish what you're looking to do where they'd reorder automatically and then link etc and it made my head hurt heh.  I got stuck on how to trigger an automation to run when a task gets deleted and updating everything else, and also stuck on how we would handle the addition of tasks (unlinking the existing one, relinking, etc), and so wanted to explore this other possibility of fixing your problem

haileyfleury
5 - Automation Enthusiast
5 - Automation Enthusiast

I think that workflow would work. Would the "magic button" be an extension or a field on the task board that triggers an automation? 

I appreciate the detailed questioned and proposed solutions! Honestly, this has my head spinning too so it is validating to hear that its not just me. Ive been working with AT for about 8m so by no means am i an expert, but ive been trying to think this one problem through for a few weeks and i just keep getting stuck.

Can you spell out how i would accomplish the solution youre proposing? I appreciate it more than you know!!

I would do the magic button as a field on the board that runs an extension actually!

Here's an example of how it'd work:

Link records in view.gif

As you can see, it links the records based on the order set within that specific view

I've DMed you a link to a base where it's been set up so you can set it up yourself too.  I made the script ask which table and field to use for linking, so it should work for your purposes immediately once you've copied it over I think!

Great, thank you! After playing around with this a little im worried it may be a little confusing to my project managers who are just getting used to the system and workflow. I think im going to back pedal on what i said earlier - the manual order number change isnt the most complicated thing in the world and maybe it would be better if the PMs did it themselves so they understand its importance. What i really want is the dependencies to work properly. So - is there a way to automatically link the predecessor task in the dependencies field (gantt view) to whatever task is previous based on the order number? For example - step 1 never has anything in the dependency field (always the first step). Step 2 links to step 1, step 3 links to step 2 etc. 

Oh yeah for sure; it's mostly the same thing, really.  The workflow would be:

1. The project manager is forced to use a single view where they manage the tasks for a specific project
2. They delete, and add tasks as they want, then set the manual order change numbers themselves.
3. The view is sorted by the order change number field, resulting in a view where the tasks are in sequential order
3. They click a magic button that will then link each record to the previous one, i.e. Record 2 gets linked to Record 1, Record 3 gets linked to Record 2, etc

haileyfleury
5 - Automation Enthusiast
5 - Automation Enthusiast

Thank you for sharing! While this isnt the solution I ended up using, I may not have figured it out without this info so i appreciate your help! I ended up creating an automation that relied on a formula field that was {order#}-1 and pulled in the previous task. If a PM wants to add their own spin on a project (through tasks) they simply wipe the order numbers, manually enter in whatever order is best for them and hit a button "create dependencies", which links the tasks together using the same logic of the formula field.