hhuijser/liferay-portal — pull request #1802 by yuhai (2014-03-19 15:14:35+00:00)
Title: LPS-45230 Post-Upgrade Activities portlet doesn't show document links

The issue was caused by extraData field value is null in socialactivity table when publish one document in 6.1.10. After upgrading from 6.1.10 to 6.2, document's title link get from extraData field of socialactivity table. Please refer to the below code fragment in BaseSocialActivityInterpreter.getTitle()
###
String entryTitle = getEntryTitle(activity, serviceContext);

getEntryTitle() {
return activity.getExtraDataValue("title", serviceContext.getLocale());
}
###

So the issue occured after upgrading (after upgrading, extraData field value is null).

Why document's title link can be displayed in 6.1.
in 6.1.x, if extraData=null, it will return fileTitle(fileEntry.getTitle()). Please refer to
DLActivityInterpreter.doInterpret()
### 95 lines
String fileTitle = getValue(
activity.getExtraData(), "title", fileEntry.getTitle());
###

BaseSocialActivityInterpreter.getValue()
###
if (Validator.isNull(extraData)) {
return HtmlUtil.escape(defaultValue);
}
###

In fact, we have fixed the issue "extraData field value is null " in 6.1.20(fixed in LPS-28482). However, the fix was not included in 6.1 GA1. So the customer's "extraData field value is null".

I think we should fix the issue in the process of upgrading. The fix refer to UpgradeSocial.updateWikiPageActivities() logic.

In dlfileentry table, it only stores all approved latest document version.
In dlfileversion table, it includes all document status version. However, only when we publish document(approved status) and the data will be inserted into socialactivity table. Please refer to DLAppHelperLocalServiceImpl.updateStatus()
###
if (status == WorkflowConstants.STATUS_APPROVED) {}
###

Please help check it.

Thanks,
Hai