This is an automated email from the ASF dual-hosted git repository.
pinal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new a2e05cdb9 ATLAS-4799 : (UI)Enum type Business metadata attribute shows
incorrect data when specific string is in attribute name
a2e05cdb9 is described below
commit a2e05cdb9319f22876e761200c006a1e7ab09437
Author: Farhan Khan <[email protected]>
AuthorDate: Mon Sep 25 19:21:46 2023 +0530
ATLAS-4799 : (UI)Enum type Business metadata attribute shows incorrect data
when specific string is in attribute name
Signed-off-by: Pinal Shah <[email protected]>
---
dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js | 2 +-
dashboardv2/public/js/views/entity/EntityBusinessMetaDataView.js | 3 ++-
dashboardv3/public/js/views/audit/CreateAuditTableLayoutView.js | 2 +-
dashboardv3/public/js/views/entity/EntityBusinessMetaDataView.js | 3 ++-
4 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
b/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
index bd4d64813..dcc0c8760 100644
--- a/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
+++ b/dashboardv2/public/js/views/audit/CreateAuditTableLayoutView.js
@@ -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 })
diff --git a/dashboardv2/public/js/views/entity/EntityBusinessMetaDataView.js
b/dashboardv2/public/js/views/entity/EntityBusinessMetaDataView.js
index 7d66dc975..025e0384b 100644
--- a/dashboardv2/public/js/views/entity/EntityBusinessMetaDataView.js
+++ b/dashboardv2/public/js/views/entity/EntityBusinessMetaDataView.js
@@ -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 });
});
diff --git a/dashboardv3/public/js/views/audit/CreateAuditTableLayoutView.js
b/dashboardv3/public/js/views/audit/CreateAuditTableLayoutView.js
index 6988c34a3..96611775d 100644
--- a/dashboardv3/public/js/views/audit/CreateAuditTableLayoutView.js
+++ b/dashboardv3/public/js/views/audit/CreateAuditTableLayoutView.js
@@ -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 })
diff --git a/dashboardv3/public/js/views/entity/EntityBusinessMetaDataView.js
b/dashboardv3/public/js/views/entity/EntityBusinessMetaDataView.js
index cb023bab2..b028a0e4a 100644
--- a/dashboardv3/public/js/views/entity/EntityBusinessMetaDataView.js
+++ b/dashboardv3/public/js/views/entity/EntityBusinessMetaDataView.js
@@ -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 });
});