cancel
Showing results for 
Search instead for 
Did you mean: 

Data List Task Title in email notification

mthomas
Champ in-the-making
Champ in-the-making
I am trying to figure out how to add the title and description of a task to my email notification for a task addition or update.  This is from a Task List created in the data lists section of a site within Share.

Currently I have set up email notifications by browsing to the appropriate folder within the datalists folder with the Repository Browser in Share.  I have set up my email rules and can receive emails for add, update, change and delete.  I have been doing this by writing custom ftl templates in the Company Home>Data Dictionary>Email Templates>Notify Email Templates.  The following works for this:

A task titled {TITLE HERE}  has been added to your task list.  It was added by ${person.properties.firstName}<#if person.properties.lastName?exists> ${person.properties.lastName}</#if>.

I would like to know the code to place in TITLE HERE to successfully pull the title from the task list for the email.  Additionally, adding the description or comments of a task would be nice to know.

Any help would be much appreciated.
Thank YOU!
11 REPLIES 11

mthomas
Champ in-the-making
Champ in-the-making
Anyone?  I guess I could clarify that the above works in that it sends the email notification and successfully inserts the person's name into the email.  What I do not know how to do is get the title or other details of the task into the email.
Any help would be much appreciated.
Thank you.

mikeh
Star Contributor
Star Contributor
You should have a top-level "document" object with all the data list's properties. e.g. document.properties["cm:title"]

Thanks,
Mike

mthomas
Champ in-the-making
Champ in-the-making
Thanks.  I'm not exactly clear as to what you mean.  But I'll explore a little.

mthomas
Champ in-the-making
Champ in-the-making
Thanks Mike, but I haven't found where the properties are being pulled from yet.  I didn't find document.properties.  Could you give me a bit of help?  In my document notify scripts I have, "The document '${document.name}', has been updated in the '${space.name}' space, it was updated by ${person.properties.firstName}"
And it works.  But what I don't know is where space.name, document name and person.properties.firstName are being defined.  Is there a properties file somewhere?

mikeh
Star Contributor
Star Contributor
Here you go; this should help point you in the right direction. http://wiki.alfresco.com/wiki/3.4_JavaScript_API

Thanks,
Mike

mthomas
Champ in-the-making
Champ in-the-making
Thanks for the quick response Mike.
I was hoping for a quick "cheat-sheet" of tasks, discussion, and doclibrary template references to pull specific data.
But I guess I'll jump in head first and try to absorb the contents in the link above.

Thanks again for the info.

mthomas
Champ in-the-making
Champ in-the-making
For anyone that is following this discussion here is what I found.  To create a notification email template that will include specific details I used the following.

Task List Name:   ${space.properties.title}
Task Title:  ${document.properties.title}
User that added it: ${person.properties.firstName}<#if person.properties.lastName?exists> ${person.properties.lastName}</#if>.
Task description: ${document.properties.description}
Link to Task List:
<#assign ref=space.nodeRef>
<#assign displayPaths=document.displayPath?split("/")>
<#assign site=displayPaths[3]>
http://myserver:8080/share/page/site/${site}/data-lists?list=${space.name}

efvrvo
Champ on-the-rise
Champ on-the-rise
how can I get the data list "assignee" or "assigned to" variable in the e-mail. I tried document.properties.assignee and document.properties.assignedto ut it returns NULL

mthomas
Champ in-the-making
Champ in-the-making
I would like to know the same thing.  Haven't worked it out yet.