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

If a gene name contains a colon Solr queries searching for the gene fail

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects versions: 1.4.5
    • Fix versions: 1.4.6, 1.5-milestone-1
    • Components: None
    • Labels:
      None
    • Sprint:

      Description

      The problem is in GeneNomenclature.java, the code there is

      final String id = StringUtils.contains(symbol, SEPARATOR)
                  ? StringUtils.substringAfter(symbol, SEPARATOR)
                  : symbol;
      

      which results in a blank symbol if there is nothing after the separator (which is a colon ":"). It should be fixed to be something like:

      final String id = StringUtils.contains(symbol, SEPARATOR) && !StringUtils.isBlank(StringUtils.substringAfter(symbol, SEPARATOR))
                  ? StringUtils.substringAfter(symbol, SEPARATOR)
                  : symbol;
      

        Attachments

          Activity

            People

            • Assignee:
              asm Andrew Misyura
              Reporter:
              asm Andrew Misyura
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: