From f0fc6745bd5a0c7e4e00644e40f1de063817b0e4 Mon Sep 17 00:00:00 2001 From: Chad Elliott Date: Wed, 13 Nov 2024 11:08:44 -0600 Subject: [PATCH] Do not use sentiment at all. Always take the answer text. --- .../services/reports/ReportDataCollation.java | 7 +---- web-ui/src/pages/MeritReportPage.jsx | 31 ------------------- 2 files changed, 1 insertion(+), 37 deletions(-) diff --git a/server/src/main/java/com/objectcomputing/checkins/services/reports/ReportDataCollation.java b/server/src/main/java/com/objectcomputing/checkins/services/reports/ReportDataCollation.java index 3578b415b..d76226331 100644 --- a/server/src/main/java/com/objectcomputing/checkins/services/reports/ReportDataCollation.java +++ b/server/src/main/java/com/objectcomputing/checkins/services/reports/ReportDataCollation.java @@ -306,12 +306,7 @@ private List getFeedbackType(FeedbackType type) { feedbackAnswers.add( new Feedback.Answer( recipientName, request.getSubmitDate(), questionText, - questionType.equals(textQuestion) || - questionType.equals(radioQuestion) ? - answer.getAnswer() : - String.valueOf(answer.getSentiment()), - questionType, - questionNumber)); + answer.getAnswer(), questionType, questionNumber)); } } } diff --git a/web-ui/src/pages/MeritReportPage.jsx b/web-ui/src/pages/MeritReportPage.jsx index bfba71125..8e11bc944 100644 --- a/web-ui/src/pages/MeritReportPage.jsx +++ b/web-ui/src/pages/MeritReportPage.jsx @@ -20,21 +20,6 @@ import { useQueryParameters } from '../helpers/query-parameters'; import markdown from 'markdown-builder'; const MeritReportPage = () => { - const agreeMarks = [ - 'Strongly Disagree', - 'Disagree', - 'Neither Agree nor Disagree', - 'Agree', - 'Strongly Agree' - ]; - const frequencyMarks = [ - 'Very Infrequently', - 'Infrequently', - 'Neither Frequently nor Infrequently', - 'Frequently', - 'Very Frequently' - ]; - const { state, dispatch } = useContext(AppContext); const csrf = selectCsrfToken(state); @@ -338,22 +323,6 @@ const MeritReportPage = () => { }; const getAnswerText = (answer) => { - if (answer.type == "SLIDER" || answer.type == "FREQ") { - const sentiment = parseFloat(answer.answer); - if (!isNaN(sentiment)) { - if (answer.type == "SLIDER") { - const index = sentiment * agreeMarks.length; - if (index >= 0 && index < agreeMarks.length) { - return agreeMarks[index]; - } - } else if (answer.type == "FREQ") { - const index = sentiment * frequencyMarks.length; - if (index >= 0 && index < frequencyMarks.length) { - return frequencyMarks[index]; - } - } - } - } return answer.answer; };