Replace form metadata name property with key property #7984
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.
What's in this PR?
Replace form metadata name with key.
Why?
Beside the
name
also akey
was introduced in #4643 Pull Request. But seems like this are just two fields.Currently it is very confusing as seen in a lot of tests where the setName was called with a value which make more sense for setTitle (e.g.
setName('Example Template')
). It is kind of intransparent here where name and where key is used and its not filled up in all cases correctly.Both
<form>
and<template>
xml both uses the<key>
and as it we personally mostly talk about template or form keys I would go here with getKey and setKey methods over the names. The only case whereFormMetadata
is created by aname
is inside block / image map every<type name="text_block">
is also an own form metadata. Still I would for bc reasons not rename the type attribute name here to key, but internal I would set by the name attribute the form key.Example Usage
To Do