Skip to content

feat(Filter): add is-not-equal and does-not-contain operator - #1718

Merged
blizzz merged 16 commits into
mainfrom
enh/noid/is-not-equal
Sep 24, 2025
Merged

feat(Filter): add is-not-equal and does-not-contain operator#1718
blizzz merged 16 commits into
mainfrom
enh/noid/is-not-equal

Conversation

@blizzz

@blizzz blizzz commented Apr 2, 2025

Copy link
Copy Markdown
Member

⚠️ This is a rudimentary and incomplete commit. I loaded a csv into tables for some analysis and quickly needed the not-equal operator for text lines. I do not expect to come back to this shortly, but it can be picked up by someone :)

@blizzz blizzz added enhancement New feature or request good first issue Good for newcomers 1. to develop Accepted and waiting to be taken care of labels Apr 2, 2025
@blizzz blizzz moved this to 🏗️ In progress in 📝 Productivity team Apr 4, 2025
@blizzz blizzz self-assigned this Apr 4, 2025
@MichelBalrine

Copy link
Copy Markdown

This PR modify 2 files which are not existing on my server :

  • src/shared/components/ncTable/mixins/columnsTypes/textLine.js
  • src/shared/components/ncTable/mixins/filter.js

Why ?

@reefsofts-rhosds

Copy link
Copy Markdown

@MiloBalara
That's the source, not the final build, so this is normal, because you should not just "run the source" in production, even if you can. Especially with JS as backend. (currently remembering trying to run anything with node)

@silverkszlo silverkszlo self-assigned this Aug 21, 2025
@silverkszlo
silverkszlo force-pushed the enh/noid/is-not-equal branch 2 times, most recently from d2cf7d7 to c079207 Compare August 27, 2025 14:14
@silverkszlo silverkszlo changed the title feat(Filter): add is-not-equal operator feat(Filter): add is-not-equal and does-not-contain operator Aug 27, 2025
@silverkszlo
silverkszlo force-pushed the enh/noid/is-not-equal branch from c079207 to 3d8e86d Compare August 27, 2025 14:19
@silverkszlo

silverkszlo commented Aug 27, 2025

Copy link
Copy Markdown
Contributor

I picked up this branch and extended the implementation.

  • Completed the support for the “is not equal” operator.
  • Added support for the “does not contain” operator.
  • Adjusted column-specific filter handling where necessary (e.g. SelectionCheck, Datetime, Usergroup).
  • Update relevant PHP Unit tests.
    → I split up Row2MapperTest.php into Row2MapperTestDependencies and Row2MapperFilterTest.
    Row2MapperTestDependencies now contains the mock data and helper functions shared by both Row2MapperTest and Row2MapperFilterTest.
  • Update relevant cypress e2e tests.

This PR now introduces both negative filter operators (is not equal, does not contain) consistently across supported column types.

@silverkszlo
silverkszlo force-pushed the enh/noid/is-not-equal branch 3 times, most recently from 746c82c to 690a427 Compare September 2, 2025 12:27
@blizzz
blizzz marked this pull request as ready for review September 2, 2025 14:57
@blizzz
blizzz requested a review from enjeck as a code owner September 2, 2025 14:57
@silverkszlo
silverkszlo force-pushed the enh/noid/is-not-equal branch from 966daaa to b6f7ea7 Compare September 3, 2025 08:56
@enjeck
enjeck force-pushed the enh/noid/is-not-equal branch 2 times, most recently from 6ec3761 to df8e838 Compare September 14, 2025 05:38

@enjeck enjeck left a comment

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.

I tested and it works. I'm happy with the frontend bits. @blizzz Any feedback?

Comment thread lib/Db/Row2Mapper.php
Comment on lines +185 to +188
} catch (DoesNotExistException $e) {
$this->logger->error($e->getMessage(), ['exception' => $e]);
throw new InternalError(get_class($this) . ' - ' . __FUNCTION__ . ': ' . $e->getMessage());
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

What is the reason behind this change on the Mapper level (and the other switches to InternalError in this class)?

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.

To be fair, those changes may be slightly out of the scope of this PR and were more of a 'refactor-while-passing-by'. I added them primarily to make the functions more robust. By catching and logging DoesNotExistException and then throwing a controlled InternalError, the idea is to prevent unhandled exceptions from crashing the application and to make debugging easier.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

OK

@blizzz blizzz moved this from 🏗️ In progress to 👀 In review in 📝 Productivity team Sep 18, 2025
blizzz and others added 16 commits September 24, 2025 06:09
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
Signed-off-by: silver <s.szmajduch@posteo.de>
@enjeck
enjeck force-pushed the enh/noid/is-not-equal branch from 301e372 to a8fae2d Compare September 24, 2025 05:09
@enjeck

enjeck commented Sep 24, 2025

Copy link
Copy Markdown
Contributor

Ready to merge?? @blizzz

@blizzz

blizzz commented Sep 24, 2025

Copy link
Copy Markdown
Member Author

Ready to merge?? @blizzz

Let's go

@blizzz
blizzz merged commit c81338f into main Sep 24, 2025
60 of 64 checks passed
@blizzz
blizzz deleted the enh/noid/is-not-equal branch September 24, 2025 12:04
@github-project-automation github-project-automation Bot moved this from 👀 In review to ☑️ Done in 📝 Productivity team Sep 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1. to develop Accepted and waiting to be taken care of enhancement New feature or request good first issue Good for newcomers

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants