ATLAS-4799 : (UI)Enum type Business metadata attribute shows incorrect data when specific string is in attribute name

Signed-off-by: Pinal Shah <pinal.shah@freestoneinfotech.com>
This commit is contained in:
Farhan Khan 2023-09-25 19:21:46 +05:30 committed by Pinal Shah
parent 4c0b47a476
commit a2e05cdb93
4 changed files with 6 additions and 4 deletions

View File

@ -143,7 +143,7 @@ define(['require',
if (attributesDetails) {
if (bmAttributesDeails) {
_.each(Object.keys(attributesDetails), function(key) {
if (bmAttributesDeails[key].typeName.toLowerCase().indexOf("date") > -1) {
if (bmAttributesDeails[key].typeName.toLowerCase().indexOf("array<date>") > -1) {
if (attributesDetails[key].length) { // multiple date values
attributesDetails[key] = _.map(attributesDetails[key], function(dateValue) {
return Utils.formatDate({ date: dateValue })

View File

@ -265,7 +265,8 @@ define([
var newVal = val;
if (_.isObject(val) && !_.isUndefinedNull(val.value)) {
newVal = val.value;
if (newVal.length > 0 && val.typeName.indexOf("date") > -1) {
//Below condition is added to handle the multiple date scenario (typeName:"array<date>")
if (newVal.length > 0 && val.typeName.indexOf("array<date>") > -1) {
newVal = _.map(newVal, function(dates) {
return Utils.formatDate({ date: dates, zone: false, dateFormat: Globals.dateFormat });
});

View File

@ -144,7 +144,7 @@ define(['require',
if (attributesDetails) {
if (bmAttributesDeails) {
_.each(Object.keys(attributesDetails), function(key) {
if (bmAttributesDeails[key].typeName.toLowerCase().indexOf("date") > -1) {
if (bmAttributesDeails[key].typeName.toLowerCase().indexOf("array<date>") > -1) {
if (attributesDetails[key].length) { // multiple date values
attributesDetails[key] = _.map(attributesDetails[key], function(dateValue) {
return Utils.formatDate({ date: dateValue })

View File

@ -265,7 +265,8 @@ define([
var newVal = val;
if (_.isObject(val) && !_.isUndefinedNull(val.value)) {
newVal = val.value;
if (newVal.length > 0 && val.typeName.indexOf("date") > -1) {
//Below condition is added to handle the multiple date scenario (typeName:"array<date>")
if (newVal.length > 0 && val.typeName.indexOf("array<date>") > -1) {
newVal = _.map(newVal, function(dates) {
return Utils.formatDate({ date: dates, zone: false, dateFormat: Globals.dateFormat });
});