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

Portal displays incorrect score for matrix surveys #857

Open
kijote0 opened this issue Nov 12, 2024 · 9 comments
Open

Portal displays incorrect score for matrix surveys #857

kijote0 opened this issue Nov 12, 2024 · 9 comments
Assignees
Labels
2day 2 days effort required Final testing Issues ready to be closed pending testing for new release priority MEDIUM Medium priority item

Comments

@kijote0
Copy link
Contributor

kijote0 commented Nov 12, 2024

We have noticed that, for surveys that use matrices, the wrong score is displayed on the Portal tab for the entire survey, even though the score for each individual survey item is properly displayed.

As an example, for a survey that has answer options scored 0-3,
user_view
the Portal tab consistently displays 0 for the entire survey,
survey_view
even though the individual survey items are displayed with the proper score.
item_view

@ZCOEngineer
Copy link

We shall check @kijote0

@sarithapillai8
Copy link
Contributor

sarithapillai8 commented Nov 20, 2024

@kijote0 We have updated the graph to show the duration taken for the survey. Update is available on https://lamp-dashboard.zcodemo.com/#/

@sarithapillai8 sarithapillai8 added 2day 2 days effort required QA testing Issue is being QA tested for production release labels Nov 20, 2024
@kijote0
Copy link
Contributor Author

kijote0 commented Nov 20, 2024

@sarithapillai8 Would it be possible to have the graph show the correct score for the survey? The duration is not really relevant for the graph; moreover, the proper score is shown for the survey if it is not configured as a matrix, which may lead to confusion.

@sarithapillai8
Copy link
Contributor

@kijote0 As discussed in the meeting, please provide a scoring method for this.

@kijote0
Copy link
Contributor Author

kijote0 commented Nov 21, 2024

@sarithapillai8 Scoring the matrix should be based on the scoring method for the initial question type (in this case, list).
As an example, I have attached json files that create the same survey instrument: one set ups the survey questions as a matrix, and the other sets them up as a list. Since the json files are identical, if the survey responses are also identical, the score should be the same, but it currently is not: in other words, answering "3" for all questions, for instance, on both versions of the survey should yield a score of 27 on the portal tab.
Please let me know if this helps with implementing the fix for this issue, or if I should go into more detail.

matrix.json
list.json

@sarithapillai8
Copy link
Contributor

@kijote0 A matrix can be of any type, such as list, date, time, short text, free text, multi-select, single-select, or slider. The challenge is that the options within a matrix can be strings, numbers, or a mix of both. Additionally, a survey can include both matrix and other types of questions. Therefore, the method described above cannot be applied in all cases. So, please suggest what to do for each of these cases, and we can then try to implement the proposed solutions.

@sarithapillai8
Copy link
Contributor

@kijote0 We currently have option text and description for the list options. Can we calculate the score using the option index value, given that we primarily use strings for both fields? Alternatively, we could add an extra field to specify an option value that can be used for score calculation.

Image

@sarithapillai8
Copy link
Contributor

@kijote0 If option texts are given as numbers, we have updated the code to show the score using that value. Option texts are saved as selected values for the survey.

@kijote0
Copy link
Contributor Author

kijote0 commented Dec 3, 2024

@sarithapillai8 I took a look, and everything looks good, thanks!

@sarithapillai8 sarithapillai8 removed the QA testing Issue is being QA tested for production release label Dec 4, 2024
@kijote0 kijote0 added the Final testing Issues ready to be closed pending testing for new release label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2day 2 days effort required Final testing Issues ready to be closed pending testing for new release priority MEDIUM Medium priority item
Projects
None yet
Development

No branches or pull requests

3 participants