Is there a way that if a task is a content type task that the node title can be displayed in the task console. This would help users determine which task to work on.

Comments

blainelang’s picture

The engine supports a dynamic taskname based on a process variable but it looks like we have not surfaced that option to be set in the workflow editor when editing a task yet. We also have code commented out in maestro_engine_version1.class.php around line 1155 that would support creating a custom taskname.

/* @TODO: Need to look at using a module HOOK that can be used in a similar way to define an custom taskname */

We wanted to create a set of API's and using drupal_alter to fire the hook would be the better way to go. Have a look but this is where you would want to alter the taskname.

haydeniv’s picture

This is a really bad way of doing this and a proper hook would be much better but I was time constrained and didn't have time to set up an api for maestro so right above that TODO line at 1155 in maestro_engine_version1.class.php add:

                $query = db_select('maestro_project_content','content');
                $query->addField('content','nid');
                $query->condition('content.instance', 1,'=');
                $query->condition('content.tracking_id', $userTaskRecord->tracking_id,'=');
                $nid = $query->execute()->fetchField();
                //echo "NID: " . $nid . "<br />\n";
                if($nid > 0) {
                  $node = node_load($nid);
                  $userTaskRecord->taskname .= ': ' . $node->title;
                }

This basically will append the node title if a node exists to the end of the task name. Not pretty but my users liked the result.