Skip to content

Fix Zammad plugin by filtering tickets after search - #328

Merged
sandrobonazzola merged 3 commits into
psss:mainfrom
come-nc:zammad
Jun 18, 2025
Merged

Fix Zammad plugin by filtering tickets after search#328
sandrobonazzola merged 3 commits into
psss:mainfrom
come-nc:zammad

Conversation

@come-nc

@come-nc come-nc commented Sep 25, 2023

Copy link
Copy Markdown
Contributor

The API query is not searching correctly and is returning more tickets that it should, so we loop on them and get articles from the API to filter which one were actually updated in the time range.

This reduces false positive a lot.

psss
psss previously requested changes Oct 2, 2023

@psss psss left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for improving this! Looks good, just two minor suggestions. Consider enabling pre-commit to catch code style errors early, see also the develop section.

Comment thread did/plugins/zammad.py Outdated
Comment thread did/plugins/zammad.py Outdated
@sandrobonazzola

Copy link
Copy Markdown
Collaborator

@come-nc can you please rebase and address @psss comments?

@come-nc

come-nc commented Jun 2, 2025

Copy link
Copy Markdown
Contributor Author

@come-nc can you please rebase and address @psss comments?

Rebased and fixed what I could, but it still complains the line is too long. I can rename the var updated_at into u but that’s kind of stupid?

@sandrobonazzola sandrobonazzola left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The plugin itself would benefit of some additional exception handling but can be done in separate patch.

@sandrobonazzola
sandrobonazzola dismissed psss’s stale review June 10, 2025 07:23

Requested changes have been provided, new review needed.

come-nc and others added 3 commits June 18, 2025 08:43
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Fixed flake8 complaints on line too long.
While doing that, refactored a bit the loops avoiding to go through the various objects to get since and until values multiple times.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants