Uploaded image for project: 'PhenoTips'
  1. PT-2342

Orange warning triangle displayed when using only free text phenotypes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 1.2.3
    • Fix Version/s: 1.3-milestone-1
    • Component/s: None
    • Labels:
      None

      Description

      If there are only custom terms, the scorer reports a score of 0, which looks correct in this case. That is returned via JSON to SpecificityMetricWidget javascript.
      In that javascript is this piece of code:

      var score = json && json.score || -1;
                  if (score >= 0) {
                    this.showValue(score);
                  } else {
                    this.unknownValue();
                  }
      

      json && json.score evaluates to false (since json.score == 0), and score is set to -1, and unknownValue() is triggered displaying the red triangle.
      I think this is a bug, since the test explicitly tests "if (score >= 0)", i.e. value of 0 is supposed to be valid.

        Attachments

          Activity

            People

            • Assignee:
              sdumitriu Sergiu Dumitriu
              Reporter:
              sasha Sasha Andjic
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: