"What's in a name? that which we call a rose
By any other name would smell as sweet."
- William Shakespeare (Romeo & Juliet)
Does a rose by any other name smell as sweet?
Does thy TaskRay tasks project name helpest thy complete?
TaskRay allows you to structure your projects in a number of different ways. For example, it is possible to create a parent project along with a number of sub-projects.
And with Task Labels, it is possible to display any task field on the task card.
Labels are great for quickly visualizing data, however if you used Project Name as a label for your sub-projects, it would display the Sub-Project Name instead of the Parent project which is likely the value you would prefer to display.
As you could imagine, this could quickly become confusing to users as to which task belongs to which parent project when viewing multiple tasks and projects at one-time. And what if you had more than just one layer of project and sub-project. In TaskRay you can have up to 5 levels of hierarchy. You likely would want the top-level (or master) project to display on the task card of each sub-project layer.
So how can we easily identify which tasks are related to which top-level/master project?
Below is a solution that should allow you to easily display the master project name as a Task Card Label on the front of any task that is part of a sub-project, even if your hierarchy is more than two layers deep.
To achieve this we'll create a formula field on the TaskRay Task object:
- In Setup, navigate to Create | Objects | TaskRay Task and click New next to the Custom Fields section.
- Choose Formula for data type and output will be Text. You can name this field "Master Project".
- Add in the formula. Feel free to copy and paste the below.
IF( ISNULL(TASKRAY__Project__r.TASKRAY__Project_Parent__r.TASKRAY__Project_Parent__r.TASKRAY__Project_Parent__r.Name), TASKRAY__Project__r.TASKRAY__Project_Parent__r.TASKRAY__Project_Parent__r.Name ,
IF( TASKRAY__Project__r.TASKRAY__Project_Parent__r.TASKRAY__Project_Parent__r.TASKRAY__Project_Parent__r.Name <> NULL, TASKRAY__Project__r.TASKRAY__Project_Parent__r.TASKRAY__Project_Parent__r.TASKRAY__Project_Parent__r.Name ,
IF( ISNULL(TASKRAY__Project__r.TASKRAY__Project_Parent__r.TASKRAY__Project_Parent__r.Name), TASKRAY__Project__r.TASKRAY__Project_Parent__r.Name,
IF( TASKRAY__Project__r.TASKRAY__Project_Parent__r.TASKRAY__Project_Parent__r.Name <> NULL, TASKRAY__Project__r.TASKRAY__Project_Parent__r.TASKRAY__Project_Parent__r.Name ,
IF( ISNULL(TASKRAY__Project__r.TASKRAY__Project_Parent__r.Name), TASKRAY__Project__r.Name,
IF( TASKRAY__Project__r.TASKRAY__Project_Parent__r.Name <> NULL, TASKRAY__Project__r.TASKRAY__Project_Parent__r.Name , TASKRAY__Project__r.Name ))))))
This formula is long since it goes a number of layers deep. This means that you can have many sub, sub, sub-projects and the tasks will still reference the name of its master project. In general this formula is saying if the great grandfather project name doesn't exist then populate the value to be the grandfather project, then if the grandfather project doesn't exist populate with the father's name and so on.
If you need to go even deeper you can create additional IF statement rows to this formula.
Once we've created and saved this field we'll need to add it to our Task Card Label field set.
To do this:
- In Setup, navigate to Create | Objects | TaskRay Task and scroll to the Field Set section.
- Click Edit next to the Task Card Label field set.
- Drag & drop the Master Project field from the top grid into the field set below.
- Be sure to hit Save at the top.
Now when we go back into TaskRay if we have any tasks that are in sub projects or sub, sub projects then the label on the front should be the name of it's master project.
This may also help in any reporting that you may have where you need to easily identify which tasks relate to which master project.
So, with thy master project name, TaskRay Tasks I doth see!