Dashboard backend ORing conditions

English! place to talk about development, programming and coding
Post Reply
martinv2
Znuny newbie
Posts: 18
Joined: 30 Jun 2014, 14:49
Znuny Version: 6.4.4
Real Name: Martin Vorländer
Company: PDV-Systeme GmbH
Contact:

Dashboard backend ORing conditions

Post by martinv2 »

Dear developer community,

our Znuny content managers go wild with creating dashboards based on the Kernel::Output::HTML::Dashboard::TicketGeneric dashboard backend module. :lol:

They now are facing the situation that a set of tickets to be displayed can't be expressed in a single Attributes set of conditions, but that they'd like to display two Attributes sets in a single dashboard (like when the attributes get ORed together). Unfortunately, TicketGeneric only allows ANDed conditions.

I thought about creating a new module based on TicketGeneric which specifies an array of values for the Attributes setting, but looking at the code this seems like a lot of work:
  • wrap sub _SearchParamsGet to be able to pass in every single Attributes value,
  • call the wrap routine in the two places _SearchParamsGet is called (in FilterContent() and Run()), and bracket the code from the calls up to any TicketSearch call in a loop iterating over the Attributes values
  • throw together the returned data in a result set.
Has anyone already implemented a dashboard backend module that does ORing of conditions?

Or does anyone have some ideas how to simplify the solution sketched above?

TIA,
Martin
Znuny 6.4.4, Ubuntu 20.04.5 LTS with MariaDB 10.3.37
root
Administrator
Posts: 4175
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Dashboard backend ORing conditions

Post by root »

Hi,

Have you asked this also at Discord? There are more developers hanging around.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
martinv2
Znuny newbie
Posts: 18
Joined: 30 Jun 2014, 14:49
Znuny Version: 6.4.4
Real Name: Martin Vorländer
Company: PDV-Systeme GmbH
Contact:

Re: Dashboard backend ORing conditions

Post by martinv2 »

Hi Roy,

I'm not on Discord (yet). Thanks for the hint.

cu,
Martin
Znuny 6.4.4, Ubuntu 20.04.5 LTS with MariaDB 10.3.37
Post Reply