Fixes #38427 - Modify replaced_by to allow for selection of new field by object. #397
+55
−27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Modified the
replaced_bystring on fields to areplaced_by_pathrelative path to another field. This allows for displaying the exact translation of the new path to stderr and can better handle label name changes in the future.From the docs:
A field may be 'replaced by' another field using
:replaced_by_path => ["relative","path","to","new","field"]. Use "!p" to indicate the parent field/list/collection and other strings to indicate the id of child field/list/collections. This will mark the field as deprecated and print a similar warning message to stderr whenever the field is displayed.For example, to replace 'Foo/Bar/Old field' with 'Foo/Baz/New field', do the following:
Example output: