pypika
pypika copied to clipboard
Initial support for JQL
Hello.
There is some basic support for JQL, could you suggest some impovements?
For now it produces
project IN ("PROJ1","PROJ2") AND issuetype="My issue" AND (labels is EMPTY OR labels NOT IN ("stale","bug")) AND Привет is EMPTY AND repos is not EMPTY AND repos NOT IN ("main","dev")
for a query like this
J = JiraTable()
j = (
JiraQueryBuilder()
.where(J.project.isin(["PROJ1", "PROJ2"]))
.where(J.issuetype == "My issue")
.where(J.labels.isempty() | J.labels.notin(["stale", "bug"]))
.where(getattr(J, "Привет").isempty())
.where(J.repos.notempty() & J.repos.notin(["main", "dev"]))
)
print(j.get_sql())
By JQL do you mean the selection in Jira or does it have more meanings?
Could you add tests?
By JQL do you mean the selection in Jira or does it have more meanings? Yeah, jql as jira query language
I din't aim for full support, just the tools I use myself. But I can add more if needed. I guess.
I believe there is no need to start with full support. We can start little and then later extend it. Could you also add this possibility in the documentation?
Sure! Done.
ugh There was a dependency conflict in my venv: https://stackoverflow.com/a/71674345