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

Use a new method to set progress - setting in the interview order block breaks stuff #926

Open
nonprofittechy opened this issue Apr 29, 2024 · 4 comments

Comments

@nonprofittechy
Copy link
Member

Do it in a different way. Maybe:

Create a DADict, like this:

---
# interview order
question: |
  ...
  set_progress_to[40] # Will run the set_progress_to block one time, for each unique index value. it won't reset it to that value
---
objects:
  set_progress_to: DADict
---
code: |
  set_progress(float(i))
  set_progress_to[i] = True
@ekressmiller
Copy link

@ekressmiller
Copy link

I like your method @nonprofittechy! It does solve the issue with automated progress stopping once you use set_progress.

But a couple downsides I think. I think several related features assume progress will be set on a question, so it's not smart enough to use this alongside:

  • progress bar method: stepped or
  • progress can go backwards: False

So I do end up with the progress jumping backward.

@ekressmiller
Copy link

(Actually I'm not sure the "stepped" method is working full stop--at least I can't seem to figure it out. So that part might be moot. But the fact that backward progress is not blocked does seem like a disadvantage.)

@nonprofittechy
Copy link
Member Author

Hmm. Well, we could add our own logic in to prevent the progress from going backwards within each block. But it seems it should be controlled higher up in the Docassemble application itself

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

No branches or pull requests

2 participants