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

[FW][FIX] survey: fix participation print #165853

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented May 16, 2024

Purpose

Fix the traceback appearing when clicking on the print button for a survey participation.

Specifications

When preparing the print page statistics, the number of correct/skipped/partial/incorrect answers are computed based on the user input lines.
The issue is that when the user input lines are retrieved, the comments are also taken into account. So when the user input lines for a simple choice question are accessed, a traceback appears as we got 2 input lines (the simple choice answer and the comment) where we expected only 1.

Fixing the issue by removing from the considered user input lines the ones related to comments if they're not considered as being an answer. (the comment_count_as_answer field on the question is False).

related PR: #120629

Task-3893199


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #163346

Purpose
=======
Fix the traceback appearing when clicking on the print button
for a survey participation.

Specifications
==============
When preparing the print page statistics, the number of
correct/skipped/partial/incorrect answers are computed based
on the user input lines.
The issue is that when the user input lines are retrieved,
the comments are also taken into account. So when the
user input lines for a simple choice question are accessed,
a traceback appears as we got 2 input lines (the simple choice
answer and the comment) where we expected only 1.

Fixing the issue by removing from the considered user input lines
the ones related to comments if they're not considered as being an answer.
(the comment_count_as_answer field on the question is False).

related PR: odoo#120629

Task-3893199

X-original-commit: 5baae4a
@robodoo
Copy link
Contributor

robodoo commented May 16, 2024

@fw-bot
Copy link
Contributor Author

fw-bot commented May 16, 2024

This PR targets saas-17.1 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label May 16, 2024
@C3POdoo C3POdoo added the RD research & development, internal work label May 16, 2024
robodoo pushed a commit that referenced this pull request May 17, 2024
Purpose
=======
Fix the traceback appearing when clicking on the print button
for a survey participation.

Specifications
==============
When preparing the print page statistics, the number of
correct/skipped/partial/incorrect answers are computed based
on the user input lines.
The issue is that when the user input lines are retrieved,
the comments are also taken into account. So when the
user input lines for a simple choice question are accessed,
a traceback appears as we got 2 input lines (the simple choice
answer and the comment) where we expected only 1.

Fixing the issue by removing from the considered user input lines
the ones related to comments if they're not considered as being an answer.
(the comment_count_as_answer field on the question is False).

related PR: #120629

Task-3893199

closes #165853

X-original-commit: 5baae4a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
@robodoo robodoo closed this May 17, 2024
@fw-bot fw-bot deleted the saas-17.1-saas-16.4-survey-fix-participation-print-amdi-SUX4-fw branch May 31, 2024 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwardport This PR was created by @fw-bot RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants