Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JQL query with Scriptrunner help

I'm trying to run a query to list issues with comments from a certain year in a certain project, but I'm not having any luck. Here is what I'm running (JQL says the syntax is correct)

 

project = "My project" and lastCommentedDate >= endOfYear()

project = "My project" and lastCommentedDate <= endOfYear()

 

Results are coming back empty. I know there are many comments in the issues in this project.

1 answer

1 accepted

0 votes
Answer accepted

Hi Denissh,

Thank you for your question.

Can I please ask you to navigate to the page located at <JiraBaseURL>/plugins/servlet/ac/com.onresolve.jira.groovy.groovyrunner/jql-sync?s=com.onresolve.jira.groovy.groovyrunner__jql-sync check if it says any issues need syncing. 

If any issues show as needing syncing then you can do this by clicking the blue *Sync All Issues* button at the bottom of the screen.

Once the issues have been synchronised then the correct properties will be stored against the issues meaning that they will be returned when using one of the JQL Keywords.

I hope this information helps.

Regards,

Kristian

Ran the indexing, now I'm seeing results! Thanks. If I want to see only lastCommentDate of any time in 2016 what would the syntax be for that?

Hi Denish,

Thank you for confirming that your issue has been resolved.

To see only comments in 2016 you would need to adjust the query to be similar to lastCommentedDate >= startOfYear(-4) AND lastCommentedDate <= endOfYear(-4) as this joins 2 queries together to search for issues between the beginning and end of the year which started 4 years ago.

I hope this helps.

Regards,

Kristian

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you