Populate repeating groups into item with duplicating linkId instead of answers
ruscoder opened this issue · 0 comments
ruscoder commented
According to the specification and discussions around repeating groups we decided to change storing answers for repeating groups.
Previously used:
item: [
{
linkId: 'repeating-group',
answer: [
{
'item': {linkId: 'subanswer', answer: [{value: {string: 'value'}}]},
},
{
'item': {linkId: 'subanswer', answer: [{value: {string: 'value'}}]},
},
]
}
]
Proposed:
item: [
{
linkId: 'repeating-group',
item: [
{linkId: 'subanswer', answer: [{value: {string: 'value'}}]},
]
},
{
linkId: 'repeating-group',
item: [
{linkId: 'subanswer', answer: [{value: {string: 'value'}}]},
]
}
]
The previously used solution had some disadvantages:
- constraint violations:
- group can not have direct answers
- missing linkId in answer (it worked because of Aidbox bug Aidbox/Issues#283)
- different behaviour for repeating and non-repeating group
- unable to use %context in expressions