Skip to content

Bug: Dashboard usability percentage is hardcoded to 75% instead of real calculation #1852

@Harshit2405-2004

Description

@Harshit2405-2004

Description

The UsabilityResults.vue dashboard card always displays 75% as the general usability metric, regardless of actual evaluation data. This is a data integrity issue — users see fake/placeholder metrics on the test manager dashboard.

Location

File: src/ux/Heuristic/components/manager/UsabilityResults.vue
Lines: 82–85

const usabilityPercentage = computed(() => {
  // Por ahora devolvemos 75% como solicitado
  // En el futuro esto se calculará basado en las respuestas reales
  return 75
})

Expected Behavior

The usability percentage should be calculated from actual evaluator answers using the same logic as calcFinalResult() in statistics.js — averaging all evaluators' scores against the maximum possible score (testOptions).

Current Behavior

The value is hardcoded to 75 with a Spanish TODO comment: "En el futuro esto se calculará basado en las respuestas reales" (In the future this will be calculated based on real answers).

Impact

  • Misleading dashboard: Every test shows "75% usability" with green/warning indicators regardless of actual results
  • Color coding is wrong: The status text ("Excellent"/"Acceptable"/"Needs improvement") and colors are driven by the hardcoded value, so they also display incorrectly
  • User trust: Evaluators may make decisions based on a fake metric

Suggested Fix

Replace the hardcoded value with a real calculation using the Vuex store:

  1. Access store.getters.test (for testOptions) and store.getters.testAnswerDocument (for evaluator answers)
  2. Use the existing statistics() and calcFinalResult() functions from src/ux/Heuristic/utils/statistics.js
  3. Average all evaluators' result values, handling the 0-evaluators edge case (return 0, not NaN)

Screenshots

N/A — the hardcoded return 75 is visible in the source code.

Environment

  • Vue 3.5 + Vuex 4
  • Component: UsabilityResults.vue
  • Related utility: src/ux/Heuristic/utils/statistics.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions