Skip to content

make use of gathered attribute in ALDocumentBundle#1015

Draft
nonprofittechy wants to merge 1 commit intomainfrom
805-better-looping-bundles
Draft

make use of gathered attribute in ALDocumentBundle#1015
nonprofittechy wants to merge 1 commit intomainfrom
805-better-looping-bundles

Conversation

@nonprofittechy
Copy link
Member

Possibly fix #806, fix #889

I don't precisely remember why we didn't do that already--I think overly cautious about potential side effects when using ALDocument.

Opening as draft because it seems like a fundamental change that needs careful testing. But I don't see why it wouldn't solve what we want it to solve.

Copy link
Collaborator

@plocket plocket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly fix #806, fix #889

It looks like #806 was already fixed. Did you mean a different issue?

Regarding the change, it seems like this may change the behavior of existing interviews depending on what architecture folks have set up. Are their arrangements of code that would break if docassemble tried to enforce a traditional gather loop?

@nonprofittechy nonprofittechy force-pushed the 805-better-looping-bundles branch 2 times, most recently from ee7f4a2 to 0b26b1e Compare February 23, 2026 15:52
@nonprofittechy
Copy link
Member Author

Regarding the change, it seems like this may change the behavior of existing interviews depending on what architecture folks have set up. Are their arrangements of code that would break if docassemble tried to enforce a traditional gather loop?

Well, that's what I'm looking for some feedback on. That's the risk I'm talking about above.

We're not talking here about a traditional gather loop--just seeking the .gathered attribute if gathered=False at initialization time of the bundle, which should look for a code block that has the definitive set of rules about how many documents to add to the bundle.

I think the most helpful thing would be to identify specific test cases to validate the behavior change is safe. The high level goal (confirming defining gathered in a separate code block won't have side effects) is clear.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance ALDocumentBundle by adding an affordance to handle dynamic item counts

3 participants