Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
c03407dc
Commit
c03407dc
authored
1 year ago
by
Adam Laskowski
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-55: Amended property history view to show multi-value properties changes
parent
3669e391
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!40
SSDM-13578 : 2PT : Database and V3 Implementation - include the new AFS "free"...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/History/HistoryModel.js
+26
-2
26 additions, 2 deletions
...as/webapps/eln-lims/html/js/views/History/HistoryModel.js
with
26 additions
and
2 deletions
ui-eln-lims/src/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/History/HistoryModel.js
+
26
−
2
View file @
c03407dc
...
@@ -67,10 +67,20 @@ function HistoryModel(entity) {
...
@@ -67,10 +67,20 @@ function HistoryModel(entity) {
if
(
entryType
===
"
PROPERTY
"
)
{
if
(
entryType
===
"
PROPERTY
"
)
{
var
validFromPropertyChanges
=
_this
.
_getPropertyChanges
(
validFromChanges
,
entry
.
propertyName
)
var
validFromPropertyChanges
=
_this
.
_getPropertyChanges
(
validFromChanges
,
entry
.
propertyName
)
validFromPropertyChanges
.
newValue
=
entry
.
propertyValue
if
(
validFromPropertyChanges
.
propertyType
.
multiValue
)
{
// validFromPropertyChanges.newValue = (validFromPropertyChanges.newValue ?? []).concat(entry.propertyValue);
_this
.
_setMultiValueProperty
(
validFromPropertyChanges
,
'
newValue
'
,
entry
.
propertyValue
);
}
else
{
validFromPropertyChanges
.
newValue
=
entry
.
propertyValue
}
if
(
validToChanges
)
{
if
(
validToChanges
)
{
var
validToPropertyChanges
=
_this
.
_getPropertyChanges
(
validToChanges
,
entry
.
propertyName
)
var
validToPropertyChanges
=
_this
.
_getPropertyChanges
(
validToChanges
,
entry
.
propertyName
)
validToPropertyChanges
.
oldValue
=
entry
.
propertyValue
if
(
validToPropertyChanges
.
propertyType
.
multiValue
)
{
// validToPropertyChanges.oldValue = (validToPropertyChanges.oldValue ?? []).concat(entry.propertyValue);
_this
.
_setMultiValueProperty
(
validToPropertyChanges
,
'
oldValue
'
,
entry
.
propertyValue
);
}
else
{
validToPropertyChanges
.
oldValue
=
entry
.
propertyValue
}
}
}
}
else
if
(
entryType
===
"
RELATION
"
)
{
}
else
if
(
entryType
===
"
RELATION
"
)
{
if
(
!
entry
.
relationType
)
{
if
(
!
entry
.
relationType
)
{
...
@@ -377,4 +387,18 @@ function HistoryModel(entity) {
...
@@ -377,4 +387,18 @@ function HistoryModel(entity) {
return
relatedObjectId
.
permId
return
relatedObjectId
.
permId
}
}
}
}
this
.
_setMultiValueProperty
=
function
(
propertyChange
,
valueType
,
value
)
{
if
(
propertyChange
[
valueType
])
{
if
(
propertyChange
.
propertyType
.
dataType
==
"
CONTROLLEDVOCABULARY
"
)
{
var
lastVal
=
propertyChange
[
valueType
][
propertyChange
[
valueType
].
length
-
1
];
lastVal
=
lastVal
.
substring
(
0
,
lastVal
.
lastIndexOf
(
'
[
'
));
propertyChange
[
valueType
][
propertyChange
[
valueType
].
length
-
1
]
=
lastVal
;
}
propertyChange
[
valueType
]
=
propertyChange
[
valueType
].
concat
(
value
);
}
else
{
propertyChange
[
valueType
]
=
[
value
];
}
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment