Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom instance attribute not applied to repeat template #686

Open
lindsay-stevens opened this issue Jan 17, 2024 · 0 comments
Open

Custom instance attribute not applied to repeat template #686

lindsay-stevens opened this issue Jan 17, 2024 · 0 comments

Comments

@lindsay-stevens
Copy link
Contributor

Software and hardware versions

pyxform v2.0.0 Python v3.8

Problem description

Custom instance attribute not applied to repeat template.

Steps to reproduce the problem

If a user adds a survey column like instance::testAttribute, the attribute value specified in the begin repeat row will be copied into the first repeat instance, but not the repeat template. So presumably, any subsequent repeat copies will not have the attribute.

Expected behavior

Both the first repeat and the repeat template should have the custom attribute. Multiple instance attributes should work too, e.g. instance::testAttribute, instance::testAttribute2, etc. The repeat template should continue to have the jr:template="" marker attribute.

Other information

As mentioned in #685 there was a test called AttributeColumnsTest which had not been run by default for a while. So this is not a new regression. It seems to have been introduced in #380 (2019), which changed repeat behaviour from only inserting the repeat template in the instance, to additionally inserting the first repeat. From reviewing #380 and the related issue ticket, this attribute behaviour change does not seem to have been intentional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant