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:
parent
4c0b47a476
commit
a2e05cdb93
|
|
@ -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 })
|
||||
|
|
|
|||
|
|
@ -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 });
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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 })
|
||||
|
|
|
|||
|
|
@ -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 });
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue