Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

reports: integrity-check conditions - an aggregate filter (HAVING) and a not-exists condition across a relation, incl. a cross-model one

Open
#7,914 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
java, sql
Domain
backend, databases

Research direction

Start by locating the row-report DSL that parses source, dimensions, measures, and filter, then trace how reports build grouped queries and resolve cross-model relations. The issue gives no file paths or tests, so identify the report query tests before making changes. Done means aggregate having filters and cross-relation notExists conditions, including cross-model matching and date ranges, are supported.

Written by the indexing model from the issue text.

Description

Problem

An accounting close needs a set of integrity-check reports. Each one lists the rows that break an invariant, so the accountant can fix them before the period is closed. Two kinds of condition come up again and again, and the row-report DSL (source + dimensions + measures + filter) cannot declare either of them on 14.88.0 or on 14.90.0. 14.90.0 adds columns, aging and cashAccounts, but no aggregate filter and no existence test.

  1. An aggregate filter (SQL HAVING). Example: duplicate document numbers per counterparty and year (two purchase invoices from the same supplier with the same supplier number in the same year). This is a grouped report (dimensions: [Supplier, year(date), supplierNumber], measures: [count(*)]) that keeps only the groups where count(*) > 1. Today the report lists every group, and the duplicates sit among thousands of rows of count 1.

  2. A not-exists condition across a relation, including a cross-model relation (an anti-join). Examples:

    • issued / approved documents that have no journal entry: a SalesInvoice in ISSUED.. for which no JournalEntry has SalesInvoice = it (the back-reference lives in the journal model);
    • payments with no posted invoice allocation;
    • journal entries whose date falls outside every fiscal year / period of their company (a FiscalYear row matched by Company and year).

    Each is "rows of A for which no row of B matches". A filter can only test A's own fields or a to-one hop, never the absence of a child or a referencing row.

Ask

Two report keys (the names are only a proposal):

reports:
  - name: DuplicateSupplierNumbers
    source: PurchaseInvoice
    dimensions: [Supplier, "year(date)", supplierNumber]
    measures: ["count(*)"]
    having: "count(*) > 1"                 # 1. a filter over the measures, after GROUP BY

  - name: DocumentsWithoutEntry
    source: SalesInvoice
    dimensions: [number, date, Customer]
    filter: "Status >= 3"
    notExists: { entity: JournalEntry, model: journal, match: { SalesInvoice: id } }   # 2. anti-join

The notExists.match would use the same {target property: source property} shape as a resolves: / forEach match, and a cross-model target would be resolved against the owner's .model the way schedules already resolve it. A date-range form (between) would cover the fiscal-period case: notExists: { entity: FiscalYear, match: { Company: Company }, between: { start: startDate, end: endDate, value: date } }.

Where it is needed

BusinessIntents/base-journal#79. Two of its six checks ship as plain reports: lines without counterparty, and draft entries older than N days. The other four (duplicate numbers, payments without a posted invoice, documents without an entry, entries outside their period) wait on this.

Dominant language
Java
Stars
278
Forks
97
Avg merge
19h 30m
Merged PRs (30d)
242

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eclipse-dirigible/dirigible

All issues in eclipse-dirigible/dirigible

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.