omegaup / omegaup

omegaUp automatic programming contest evaluator & arena
https://omegaup.com
Other
230 stars 303 forks source link

[BUG] Difficulty finding problems with both id and alias set to single character. #7561

Open Aritra8438 opened 6 months ago

Aritra8438 commented 6 months ago

Let's say, we have a problem with name and alias both set to 'a'.

If we want to add the same problem to a contest, we need to find it in the search box which only emits update-search-result-problems if searchType has at least (activation-threshold) 2 letters.

<omegaup-common-typeahead
  class="w-75"
  :existing-options="searchResultProblems"
  :activation-threshold="2"
  :value.sync="alias"
  @update-existing-options="
                  (query) =>
                    $emit('update-search-result-problems', {
                      query,
                      searchType: selectedSearchType,
                    })
                "
></omegaup-common-typeahead>

So, we can't add the problem to the contest.

Expected Behavior

to reproduce this bug:

  1. Create a problem with both alias and name set to a.
  2. Try to add the problem to a contest.
  3. You can't find the problem as search triggers if there are at least two characters.
Aritra8438 commented 6 months ago

As @pabo99 mentioned, the two possible solutions are:

I want to solve it accordingly.