Advanced serching

Issue #219 resolved
FatimaM created an issue

Hi.Could you help me with advanced searching.It is neccessary to find issues that were resolved exactly 7 days ago(operators greater or equal than 6 or 7 days is not suitable)

How can I write correct expression for this (resolved= -7d is not working)

Comments (2)

  1. Fidel Castro Armario repo owner

    Hi Fatima,

    I'm not an expert on JQL but the problem seem to be that in JQL the query "resolved = -7d" means 7 days before current date and time with a precision of milliseconds, so it's practically impossible that this JQL query returns some issue.

    Using JIRA Workflow Toolbox you can create an expression for doing such an issue selection, that you can use it your conditions, validations and post-functions. The expression is:

    datePart(%{nnnnn}, LOCAL) = datePart(%{00057}, LOCAL) - 7 * DAY
    

    where %{nnnnn} is the field code for a Date Picker custom field that contains the resolution date. JIRA Workflow Toolbox currently doesn't provide a field equivalent to JQL's Resolved and you would have to create it yourself, by adding a post-function to transition "Resolved Issue" for setting the custom field using current date and time.

    Note that %{00057} is field code for "Current date and time".

    If your issue selection is intended to be used in a condition, validator or post-function, I can help you to implement it, but unfortunately I can't help you if you want to create a JIRA filter, and I'm afraid JQL doesn't have enough expressivity.

    Maybe, someone at Atlassian Answers with more knowledge of JQL than me may help you.

  2. Log in to comment