Page 1 of 1

Notification message subject change in 6.3

PostPosted:Tue Sep 22, 2015 7:21 am
by Donatas
Hello,

I have problems with notification subject modification in 6.3. I need document name in the subject field. In 6.2 documentation I found the string "OpenKM - NOTIFICATION - ${documentName}", but in 6.3 it doesn't work. I get the error that documentName is not defined. So what is the variable name for document name?

Re: Notification message subject change in 6.3

PostPosted:Thu Sep 24, 2015 8:52 am
by jllort
If you delete the parameters will be generated default.

You can try with:
${documentPath}
${documentUrl}
${documentName}

If not going right, can you upgrade to nightly build integration.openkm.com ( guide to upgrade http://wiki.openkm.com/index.php/Migrat ... 3_to_6.3.1 )

Re: Notification message subject change in 6.3

PostPosted:Tue Sep 29, 2015 7:43 am
by Donatas
I have upgraded to nightly build 8230, but still get error:
Code: Select all
ERROR freemarker.runtime- Expression documentName is undefined on line 1, column 27 in NotificationMessageSubject.

Re: Notification message subject change in 6.3

PostPosted:Wed Sep 30, 2015 11:34 am
by pavila
In OpenKM 6.3.1 you have these objects to use in the template:

* userId: The user who generates the notification.
* notificationMessage: The notification message:
* documentList: The list of documents related to this notification.

As an example, you can set the notification.message.body configuration property as:
Code: Select all
Message: ${notificationMessage}
User: ${userId}
<#list documentList as doc>Document: ${doc.path}
</#list>
I've also updated the migration guide.

Re: Notification message subject change in 6.3

PostPosted:Sat Oct 24, 2015 7:07 pm
by Donatas
But is it possible to have a document file name in the notification.message.subject? In older versions it was possible and it's very convenient to see file name in the e-mail subject field.

Re: Notification message subject change in 6.3

PostPosted:Thu Oct 29, 2015 8:29 am
by pavila
The problem is that now it can handle several documents notifications at the same time. But I think you can do this getting the first document in the documentList list. Check Freemarker documentation.