Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gutenberg
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
gutenberg
Merge requests
!124
Issue
#3401973
: If no changes on content, don't update field values.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3401973
: If no changes on content, don't update field values.
issue/gutenberg-3401973:cherry-pick-7762befd
into
8.x-2.x
Overview
0
Commits
2
Pipelines
3
Changes
1
Merged
Marco Fernandes
requested to merge
issue/gutenberg-3401973:cherry-pick-7762befd
into
8.x-2.x
10 months ago
Overview
0
Commits
2
Pipelines
3
Changes
1
Expand
(cherry picked from commit
7762befd
)
0
0
Merge request reports
Compare
8.x-2.x
version 1
fd76defe
10 months ago
8.x-2.x (base)
and
latest version
latest version
a569f464
2 commits,
10 months ago
version 1
fd76defe
1 commit,
10 months ago
1 file
+
10
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/MappingFieldsHelper.php
+
10
−
0
Options
@@ -73,11 +73,21 @@ class MappingFieldsHelper implements ContainerInjectionInterface {
}
$field_content
=
$entity
->
get
(
$text_fields
[
0
])
->
getString
();
$original_field_content
=
''
;
if
(
$entity
->
original
)
{
$original_field_content
=
$entity
->
original
->
get
(
$text_fields
[
0
])
->
getString
();
}
// Fetch only blocks with mapping fields.
$block_parser
=
new
BlockParser
();
$blocks
=
$block_parser
->
parse
(
$field_content
,
[
$this
,
'filterMappingFieldsBlock'
]);
// If content hasn't changed, no need to update fields.
if
(
$field_content
===
$original_field_content
)
{
return
;
}
// Let's build the field's array of values.
$fields
=
[];
$filter_formats
=
filter_formats
();
Loading