Skip to content

[NAE-2466] Advanced search for PFQL - #352

Open
Retoocs wants to merge 56 commits into
release/6.6.0from
NAE-2466
Open

[NAE-2466] Advanced search for PFQL#352
Retoocs wants to merge 56 commits into
release/6.6.0from
NAE-2466

Conversation

@Retoocs

@Retoocs Retoocs commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Description

Improvements

  • implemented functionality, which can parse a PFQL query into advanced search categories
  • filter data field can be used in the form as clickable advanced-search or as plain text query input
  • filter data field component can be initialized by PFQL query saved in the database
  • reworked advanced-search to fully work with PFQL

Fixed

  • fixed searching in header by meta-processIdentifier

Implements NAE-2466

Dependencies

"antlr4ng": "^3.0.16",

Third party dependencies

Blocking Pull requests

There are no dependencies on other PR

How Has Been This Tested?

Manually and by unit tests

Test Configuration

Name Tested on
OS Ubuntu 24.04.1 LTS
Runtime Node 23.6.1
Dependency Manager NPM 11.0.0
Framework version Angular 19.2.2
Run parameters
Other configuration

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes have been checked, personally or remotely, with @...
  • I have commented my code, particularly in hard-to-understand areas
  • I have resolved all conflicts with the target branch of the PR
  • I have updated and synced my code with the target branch
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes:
    • Lint test
    • Unit tests
    • Integration tests
  • I have checked my contribution with code analysis tools:
  • I have made corresponding changes to the documentation:
    • Developer documentation
    • User Guides
    • Migration Guides

Retoocs added 30 commits July 15, 2026 13:01
- update advanced search to use PFQL query
- fix tests
- fix code according to tests
- update tests with some pfql queries
- update operator is-null to work with PFQL
- remove categories that are impossible to use with PFQL
- update like operator to work with PFQL
- add antlr dependency and PFQL grammar
- implement mechanism to parse string PFQL query into advanced search
- add todos
- update parser: implement handling for more case categories
- implement handling for CaseDataSet category
- implement handling for CaseDataSet category
- implement handling for task categories
- add documentation
- resolve some todos
- handle logged user placeholders
- implement negations for simple expressions
- implement negations for complex expressions
- fix negations in complex-expression.ts
- fix reducing complex expressions in pfql-utils.ts
- fix handling simple ORs
- fix await for category loadings
- flat query items if the boolean operator is the same as parent predicate's boolean operator
- fix redundant requests to BE when initializing advanced search
- fix race condition when loading dataset category from pfql
- remove push down negation
- remove OR operator button
- introduce plain query category
- implement loading of plain query
- implement possibility to show filter field as advanced search in form
- change default component of filter to string-query
- update CaseProcess category so when used in form there is no autocomplete
- remove filter metadata implementation
- update advanced search immediate field representation
- fix process identifier column search
- resolve some todos
@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: c5db27b0-271c-48d9-a5ca-3d44533f094b


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- add search service test
- remove unwanted import
# Conflicts:
#	projects/netgrif-components-core/src/lib/header/case-header/case-header.service.ts
@Retoocs
Retoocs marked this pull request as ready for review September 1, 2026 19:35
- rework dependency injection for PFQL components
- update maximumError to 6.5 MB
- fix behavior for advanced search field content
- fix missing provider
- fix missing token
- fix case dataset as immediate field
"help": {
"title": "Nápoveda pre rozšírené vyhľadávanie",
"text": "Rozšírené vyhľadávanie slúži na zostavenie komplikovanejších požiadaviek na vyhľadávanie. Na začiatku zvoľte kategóriu vyhľadávania. Kategória vyhľadávania učruje, podľa čoho má váš dopyt vyhľadávať. Niektoré kategórie, ako napríklad \"Dáta prípadu\" vyžadujú dodatočnú konfiguráciu. Po zvolení kategórie je nutné zvoliť operátor vyhľadávania. Operátor rozhoduje o tom, akým spôsobom sa hľadá zhoda s hľadaným výtazom a dátami. Operátorom je možné hľadať napríklad presnú zhodu, alebo hodnotu z rozsahu. Nakoniec je nutné zadať hľadanú hodnotu. Dopyty je možné kombinovať pomocou kľúčových slov A SÚČASNE a ALEBO. Dopyty kombinované slovom ALEBO nájdu výsledky, spĺňajúce aspoň jednu z podmienok. Dopyty kombinované slovom A SÚČASNE nájdu výsledky spĺňajúce všetky podmienky."
"text": "Rozšírené vyhľadávanie slúži na zostavenie komplikovanejších požiadaviek na vyhľadávanie. Na začiatku zvoľte kategóriu vyhľadávania. Kategória vyhľadávania určuje, podľa čoho má váš dopyt vyhľadávať. Niektoré kategórie, ako napríklad \"Dáta prípadu\" vyžadujú dodatočnú konfiguráciu. Po zvolení kategórie je nutné zvoliť operátor vyhľadávania. Operátor rozhoduje o tom, akým spôsobom sa hľadá zhoda s hľadaným výrazom a dátami. Operátorom je možné hľadať napríklad presnú zhodu, alebo hodnotu z rozsahu. Nakoniec je nutné zadať hľadanú hodnotu. Dopyty je možné kombinovať pomocou kľúčových slov A SÚČASNE. Dopyty kombinované slovom A SÚČASNE nájdu výsledky spĺňajúce všetky podmienky. If you wish to enter more complex queries you can select plain query category and enter any valid PFQL query. Ak potrebujete zadať komplexnejší dopyt, môžete zvoliť kategóriu 'Obyčajný dopyt', kde viete napísať ľubovoľný platný PFQL dopyt."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

part of the sentence is in english, remove it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

export class ComplexExpression implements QueryItemInterface {
protected _items: QueryItem[];

public constructor(items: QueryItem[]) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be optional parameter

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Comment thread package.json Outdated
"angular-resizable-element": "~7.0.0",
"angular-resize-event": "~3.2.0",
"angular2-hotkeys": "~16.0.0",
"antlr4ng": "^3.0.16",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this one also a prerequisity for netgrif/components or components-core? or just for project ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. The dependency is used in core. I'm going to check if the dependency should be defined in core or in components. The definition should not be here on project level

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved the antlr4ng dependency to core package.json. The new dev dependency I'm going to keep here

- move antlr dependency to core
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
15.2% Coverage on New Code (required ≥ 50%)
7.8% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

2 participants