creativecommons / termination-of-transfer

Termination of Transfer tool
https://rightsback.org/questionnaire/
GNU Affero General Public License v3.0
24 stars 31 forks source link

Fixing dual window outputs #85

Closed AAMike closed 7 years ago

AAMike commented 7 years ago

Presently, the tool creates dual-window outputs for all post 78 results where the p_right is not affirmatively marked as "yes." Instead, should only happen where p_right is "don't know" (i.e., undefined).

NOTE/WARNING: I'm not really sure how the values are passed from the question to the test here. Essentially, we only want to pick up the "maybe" answer here. So the appropriate fix might be to set this change to == 'maybe' rather than == undefined.

rheaplex commented 7 years ago

@AAMike We can check for 'maybe'; if it's specified as one of the values for the question in rules.js then rendering.js will include it explicitly as the value of that option. This is different from undefined, which will be the value of a variable that has not been set.

So if a variable being set to "maybe" has different meaning in the code from it being undefined we should definitely check for that explicitly.

AAMike commented 7 years ago

Perfect, thanks!

AAMike commented 7 years ago

OK, I've confused myself about the current status of this. Let's change to 'maybe', as you note, and we're good to go. Do you need me to submit another pull request?

rheaplex commented 7 years ago

I've made the change in b34ed51 .