Skip to main content
Question

Wrong results while executing JQL query against Jira Server

  • November 20, 2024
  • 5 replies
  • 26 views

Hello.

I have a zap which triggers the following JQL query:

`project = PROJECT AND status = “In Progress” AND issuetype in standardIssueTypes() AND (component = "First component" AND component = "Second component") AND status changed before -7d AND NOT status changed after -7d`

It pulls all issues which are in “In Progress” status for more than 7 days.

The problem: when some issue was in another status for more than 7 days, and was just transitioned to “In Progress”, zap catches this issue and sends a notification. But obviously it shouldn’t. Everything works fine when I run the query manually in Jira, I don’t see such issues.

Any ideas what could be the reason of such behaviour? I was thinking about time zone differences, something like that, but I’m not sure. Thanks in advance.

Did this topic help you find an answer to your question?

5 replies

Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 30723 replies
  • November 20, 2024

Hi ​@Egor Vlasov 

For us to have true context, post screenshots showing how your Zap steps are outlined and configured in EDIT mode so we can see the field mappings/settings.


  • Author
  • Beginner
  • 2 replies
  • November 20, 2024

Sure.

 


Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 30723 replies
  • November 20, 2024

@Egor Vlasov 

Feedback from ChatGPT that may provide guidance...

 

Corrected Query (Hypothetical)

project = <value> AND status = "In Progress" AND issuetype IN standardIssueTypes() AND (component = '<value1>' OR component = '<value2>') AND status changed before -14d

 

 


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7274 replies
  • November 29, 2024

Hi there, ​@Egor Vlasov! 👋

Did the adjusted query that Troy shared from ChatGPT do the trick?

Want to make sure you’re all set so please let us know how you’re getting on—happy to lend a hand if you’re still stuck at all! 🙂


  • Author
  • Beginner
  • 2 replies
  • November 29, 2024

@SamB hello.

I’ve tried these adjustments before, but they didn’t work.

I’ve switched to approach with jira rest api call and some calculations using JavaScript. Looks more reliable now.