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

If you say "none of the above" on simple conditions page, you should go right into exploring more problems #406

Open
nonprofittechy opened this issue Jul 27, 2023 · 7 comments

Comments

@nonprofittechy
Copy link
Collaborator

nonprofittechy commented Jul 27, 2023

Currently you get an intermediate screen that says "you've already told us about these problems" but the list of problems is empty.

We should change so it skips this screen or make the language conditional.

@nonprofittechy
Copy link
Collaborator Author

nonprofittechy commented Jul 27, 2023

Apparently we are checking for the length of a list of elements, but it's not the right list. There may be a method of the class we should be calling instead that gets just the selected conditions.

(or we need to check for true_values()?)

@miabonardi
Copy link
Contributor

@nonprofittechy This is the question:

---
id: review simple conditions
question: |
Do you want to keep exploring problems?
subquestion: |
**You have told us about the following problems:**
% for basis in kind_of_lawsuit.true_values():
% if basis == "get_emergency_repairs":
* Get repairs
% elif basis == "past_repair_needs":
* Get paid because of repairs I needed in the last 6 years
% elif basis == "illegal_lockout":
* Landlord illegally locked me out of the apartment or moved my belongings out, or threatened to do so
% elif basis == "entered_without_permission":
* Landlord entered my home without permission
% elif basis == "insufficient_notice":
* Landlord entered without notice
% elif basis == "utilities_no_agreement":
* Landlord made me pay for utilities without a written agreement
% elif basis == "utility_shutoff":
* My utilities were shutoff
% elif basis == "other_landlord_tenant":
* Other
% elif basis == "file_contempt_complaint":
* My landlord is ignoring a court order
% endif
% endfor
% for category in bad_conditions.elements:
% for index, row in bad_conditions[category].df.iterrows():
* [:pencil-alt: ${ row['Interview description'] }](${ url_action(f'bad_conditions["{str(category)}"].details["{str(index)}"].condition_existed_at_start')})
% endfor
% endfor
${ collapse_template(how_many_problems_are_there_template)}
fields:
- Keep exploring problems?: wants_detailed_conditions
datatype: radio
choices:
- Yes, explore problems I may have in each room: True
- No, go straight to a solution: False
---

When you say none of the above on the screen before this, the list shows up blank here but the heading still shows:

Screen Shot 2023-07-27 at 11 25 50 AM

@miabonardi
Copy link
Contributor

I've tried a lot of different things to get the heading to not show, let me know what you suggest @nonprofittechy.

Caroline says there is also a screen we can redirect user to instead of this one in this situation.

@miabonardi
Copy link
Contributor

Another screen where if user proceeds with selecting no repair issues is funky
Screen Shot 2023-08-01 at 4 02 03 PM

@miabonardi
Copy link
Contributor

Screen Shot 2023-08-01 at 4 20 51 PM

Skip and continue button doesnt work unless you add at least 1 problem

@miabonardi miabonardi added this to the August Sprint milestone Aug 3, 2023
@miabonardi
Copy link
Contributor

miabonardi commented Aug 17, 2023

Tried this for id: review simple conditions

len(kind_of_lawsuit.true_values()) > 0 or bad_conditions.count_conditions() > 0

Look at load_data.py

@miabonardi
Copy link
Contributor

Tried this for id: review simple conditions

len(kind_of_lawsuit.true_values()) > 0 or bad_conditions.count_conditions() > 0

Look at load_data.py

@nonprofittechy I kept getting gateway timeouts when looking into this again but here's the section from load_data.py

def count_conditions(self): """Return the total number of selected conditions""" total = 0 if not len(self): return 0 for category in self: total += len(self[category].df) return total

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

2 participants