JQL search thrown system error

XMLWordPrintable

    • 5.01

      JQL thrown error when running the following JQL:

      status was Reopened by currentUser() AFTER startOfDay("today")
      

      The main reason was the argument today for startOfDay that causing the no match error with either quotes or not.

      Step to Reproduce

      1. Go to Advanced Search
      2. Search the below JQL
        status was Reopened by currentUser() AFTER startOfDay("today")
        
      3. JIRA will give you the oops error page:

      Stacktrace for 5.1:

      java.lang.IllegalStateException: No match found
      	at java.util.regex.Matcher.group(Matcher.java:468)
      	at com.atlassian.jira.plugin.jql.function.AbstractDateFunction.getDurationAmount(AbstractDateFunction.java:80)
      	at com.atlassian.jira.plugin.jql.function.StartOfDayFunction.getValues(StartOfDayFunction.java:47)
      	at com.atlassian.jira.jql.operand.FunctionOperandHandler.getValues(FunctionOperandHandler.java:36)
      	at com.atlassian.jira.jql.operand.PredicateOperandHandlerRegistry$FunctionPredicateOperandHandler.getValues(PredicateOperandHandlerRegistry.java:228)
      	at com.atlassian.jira.jql.operand.DefaultPredicateOperandResolver.getValues(DefaultPredicateOperandResolver.java:31)
      	at com.atlassian.jira.jql.validator.HistoryPredicateValidator.validateTerminalPredicate(HistoryPredicateValidator.java:90)
      	at com.atlassian.jira.jql.validator.HistoryPredicateValidator.validate(HistoryPredicateValidator.java:71)
      	at com.atlassian.jira.jql.validator.HistoryPredicateValidator.validate(HistoryPredicateValidator.java:56)
      	at com.atlassian.jira.jql.validator.WasClauseValidator.validate(WasClauseValidator.java:87)
      ...
      

      Stacktrace for 5.2.7:

      Note: 5.2.7 didn't thrown the Oops error page but stacktrace was thrown in the console/logs.

      2013-03-22 22:19:33,376 http-bio-8527-exec-10 ERROR admin 1339x5034x1 d5ofiy 127.0.0.1 /rest/issueNav/1/issueTable/ [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service
      java.lang.IllegalStateException: No match found
      	at java.util.regex.Matcher.group(Matcher.java:468)
      	at com.atlassian.jira.plugin.jql.function.AbstractDateFunction.getDurationAmount(AbstractDateFunction.java:80)
      	at com.atlassian.jira.plugin.jql.function.StartOfDayFunction.getValues(StartOfDayFunction.java:47)
      	at com.atlassian.jira.jql.operand.FunctionOperandHandler.getValues(FunctionOperandHandler.java:36)
      	at com.atlassian.jira.jql.operand.PredicateOperandHandlerRegistry$FunctionPredicateOperandHandler.getValues(PredicateOperandHandlerRegistry.java:228)
      	at com.atlassian.jira.jql.operand.DefaultPredicateOperandResolver.getValues(DefaultPredicateOperandResolver.java:31)
      	at com.atlassian.jira.jql.validator.HistoryPredicateValidator.validateTerminalPredicate(HistoryPredicateValidator.java:90)
      	at com.atlassian.jira.jql.validator.HistoryPredicateValidator.validate(HistoryPredicateValidator.java:71)
      	at com.atlassian.jira.jql.validator.HistoryPredicateValidator.validate(HistoryPredicateValidator.java:56)
      	at com.atlassian.jira.jql.validator.WasClauseValidator.validate(WasClauseValidator.java:87)
      	at com.atlassian.jira.jql.validator.ValidatorVisitor.validateClause(ValidatorVisitor.java:133)
      

      Wordaround

      String arguments are not supported by startOfDay. It has to be in the form as explained at https://confluence.atlassian.com/display/JIRA/Advanced+Searching#AdvancedSearching-startOfDay

            Assignee:
            Eric Dalgliesh
            Reporter:
            TeckEn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: