reports: integrity-check conditions - an aggregate filter (HAVING) and a not-exists condition across a relation, incl. a cross-model one
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
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.
-
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 wherecount(*) > 1. Today the report lists every group, and the duplicates sit among thousands of rows of count 1. -
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
filtercan only test A's own fields or a to-one hop, never the absence of a child or a referencing row. - issued / approved documents that have no journal entry: a SalesInvoice in ISSUED.. for which no JournalEntry has
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
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from eclipse-dirigible/dirigible
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
eclipse-dirigible/dirigible#7958 ·
Maintainers usually reply within 1 day
-
intent: a create-from without fromStatus answers 200 on a missing or unknown source id (no 400/404)Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
eclipse-dirigible/dirigible#7945 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
eclipse-dirigible/dirigible#7891 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
eclipse-dirigible/dirigible#6538 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
eclipse-dirigible/dirigible#4812 ·
Maintainers usually reply within 1 day
All issues in eclipse-dirigible/dirigible
Similar issues
-
area: android good first issue help wanted testing
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Gautam-aman/ResQNet#56 ·
Maintainers usually reply within 1 day
-
documentation hermes-queue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
chrisalunlloyd2-sudo/mindpalace#294 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
QuicksilverMC/Argentum#31 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
saysky/ForestBlog#111 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
eclipse-hawkbit/hawkbit#3429 · 1 comment ·
Maintainers usually reply within 1 day