docassemble-ALWeaver icon indicating copy to clipboard operation
docassemble-ALWeaver copied to clipboard

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

Open nonprofittechy opened this issue 1 year ago • 4 comments

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

nonprofittechy avatar Apr 29 '24 14:04 nonprofittechy

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 avatar Apr 29 '24 21:04 ekressmiller

(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.)

ekressmiller avatar Apr 29 '24 22:04 ekressmiller

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

nonprofittechy avatar Apr 29 '24 23:04 nonprofittechy