Skip to content

Fix heuristic evaluation when no answer options are configured#1885

Open
anushreeshekokar78 wants to merge 1 commit intoruxailab:developfrom
anushreeshekokar78:fix-heuristic-no-options
Open

Fix heuristic evaluation when no answer options are configured#1885
anushreeshekokar78 wants to merge 1 commit intoruxailab:developfrom
anushreeshekokar78:fix-heuristic-no-options

Conversation

@anushreeshekokar78
Copy link

Fix heuristic evaluation when no answer options are configured

Fixes #1874

Problem

It is possible to create heuristic questions without configuring answer options.
When the evaluation interface loads, the dropdown appears but shows "No data available", preventing evaluators from selecting an answer.

Solution

Added validation in HeuristicTestView.vue to check if test.testOptions exists.

  • If options are empty, the dropdown is not rendered.
  • Instead, a warning message is shown:
    "No answer options configured for this test."
  • Added validation in startTest() to prevent starting the test when no options exist.

Result

The evaluation interface no longer displays an unusable dropdown and clearly informs the user that answer options are missing.

Screenshots

UI warning example Evaluation interface warning

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐞 BUG]: Heuristic questions can be created without answer options, resulting in unusable evaluation interface

1 participant