Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RD-15247: Reimplement JQL generation #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bgaidioz
Copy link
Contributor

@bgaidioz bgaidioz commented Dec 19, 2024

Main issue is that we do not rewrite IS NULL or IS NOT NULL correctly. They come as x = NULL or x != NULL. In JQL they have to be rewritten as IS EMPTY or IS NOT EMPTY. That's what is fixed here.

It's now possible to filter issues without a description (or with a description with IS NOT NULL).

SELECT components          
FROM jira.jira_issue
WHERE description IS NULL
LIMIT 10;

Still, some fields can't be filtered with IS NULL, it's enforced by JQL. Like that field id used in the original bug report.

Later the ticket was changed to failing on epic_key IS NULL. epic_key can legitimately be null, but filtering it for = or != can't use the same keyword as when filtering for IS NULL.

This patch is refactoring the JQL generation, case by case. That has some advantages:

  • supporting IN and NOT IN when supported (this is new), or IS NULL
  • skip predicates that can't be implemented (e.g. self = ...) while before we were assuming all were supported,
  • track whether or not all predicates were applied, which will eventually permit to fix RD-15251 (pushing of LIMIT) or tell the user,

I had to delete two tests that were testing the infrastructure, since now the DasJiraTableManager needs connectivity to a JIRA server to know the user timezone.

@bgaidioz bgaidioz changed the title Fixed RD-15247: IS [NOT] NULL generates wrong JQL RD-15247: IS [NOT] NULL generates wrong JQL Dec 19, 2024
@bgaidioz bgaidioz force-pushed the RD-15247-is-null-with-das-jira-jira-issue-table branch 2 times, most recently from 7313e49 to 499b575 Compare December 31, 2024 08:53
@bgaidioz bgaidioz changed the title RD-15247: IS [NOT] NULL generates wrong JQL RD-15247: Reimplement JQL generation Jan 6, 2025
@bgaidioz bgaidioz force-pushed the RD-15247-is-null-with-das-jira-jira-issue-table branch from dc553a4 to 456d9da Compare January 6, 2025 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant