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

replication - boolean fields need to export Y or N, not true or false #10224

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import de.metas.security.permissions.Access;
import de.metas.util.Check;
import de.metas.util.Services;
import de.metas.util.StringUtils;
import lombok.NonNull;
import org.adempiere.ad.table.api.IADTableDAO;
import org.adempiere.exceptions.AdempiereException;
Expand Down Expand Up @@ -745,6 +746,10 @@ else if (DisplayType.isDate(displayType))
{
valueString = encodeDate((Timestamp)value, formatLine, displayType);
}
else if (DisplayType.isYesNo(displayType))
{
valueString = StringUtils.ofBoolean((Boolean)value,"N");
}
else
{
final String str = value.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,13 @@ public static boolean isDate (int displayType)
return false;
} // isDate

public static boolean isYesNo (int displayType)
{
if (displayType == YesNo)
return true;
return false;
}

/**
* Returns true if DisplayType is a generic lookup (List, Table, TableDir, Search).
* (stored as Integer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,6 @@ private static String formatSLF4JMessage(final String message, Object... params)

/**
* Formats the given message the using {@link Format}.
*
* @param message
* @param params
* @return
*/
public static String formatJavaTextFormatMessage(final String message, Object... params)
{
Expand Down