Altinn / altinn-pdf

Altinn platform microservice for generating PDFs
0 stars 1 forks source link

PDF generator shows empty values for rep groups where group name is used for child item #2

Closed OddArneSaetervik closed 2 years ago

OddArneSaetervik commented 2 years ago

@lorang92 commented on Tue Nov 02 2021

Describe the bug

See title.

Related line: String replacedBinding = currentBinding.replace(groupBinding, groupBinding + '[' + groupIndex + ']'); Investigate if we similar other faulty logic.

To Reproduce

Steps to reproduce the behavior:

  1. Create a service that has a rep group with a child property that matches group name
  2. Submit form with group
  3. See that only first value is shown

Expected behavior

Nothing wrong with supporting children with name or partial name as parent, this should be supported.

Additional info

Example xsd:

  <owner>
    <ownerorganisationid>1</ownerorganisationid>
    <ownername>a</ownername>
  </owner>
  <owner>
    <ownerorganisationid>2</ownerorganisationid>
    <ownername>b</ownername>
  </owner>
  <owner>
    <ownerorganisationid>3</ownerorganisationid>
    <ownername>c</ownername>
  </owner>

Output: image

acn-sbuad commented 2 years ago

Regression test completed and bugfix verified n AT image.png