Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LPS-118184 #761

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,16 @@
import com.liferay.petra.string.StringPool;
import com.liferay.portal.kernel.dao.orm.QueryUtil;
import com.liferay.portal.kernel.language.LanguageUtil;
import com.liferay.portal.kernel.util.FastDateFormatFactoryUtil;
import com.liferay.portal.kernel.util.HtmlUtil;
import com.liferay.portal.kernel.util.ListUtil;
import com.liferay.portal.kernel.util.OrderByComparator;
import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portal.kernel.util.Validator;
import com.liferay.portal.kernel.workflow.WorkflowConstants;

import java.text.Format;

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
Expand Down Expand Up @@ -185,8 +188,6 @@ protected List<Map<String, String>> getDDMFormFieldValues(
List<DDMFormInstanceRecord> ddmFormInstanceRecords, Locale locale)
throws Exception {

DateTimeFormatter dateTimeFormatter = getDateTimeFormatter(locale);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @antonio-ortega, can you please also remove this method and its references on tests? After your fix, it became useless as the method formatDate.

Thanks.


List<Map<String, String>> ddmFormFieldValues = new ArrayList<>();

for (DDMFormInstanceRecord ddmFormInstanceRecord :
Expand Down Expand Up @@ -222,11 +223,13 @@ protected List<Map<String, String>> getDDMFormFieldValues(
getStatusMessage(
ddmFormInstanceRecordVersion.getStatus(), locale));

Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(
locale);

ddmFormFieldsValue.put(
_MODIFIED_DATE,
formatDate(
ddmFormInstanceRecordVersion.getStatusDate(),
dateTimeFormatter));
dateFormatDateTime.format(
ddmFormInstanceRecordVersion.getStatusDate()));

ddmFormFieldsValue.put(
_AUTHOR, ddmFormInstanceRecordVersion.getUserName());
Expand Down