Giter Club home page Giter Club logo

ticketfilter's Introduction

Ticketfilter

Ticketfilter will allow you to configure ticket title or emailsubject match patterns that, if matched against existing tickets, will add that tickets content as an followup instead of creating a new ticket. This allows you for example to link monitoring systems that use destinct identifiers in their notifications to update GLPI tickets without being aware of the GLPI identifier [GLPI #12345]. This can also be used to link upstream ticket systems like JIRA with GLPI using mail notification. In addition to matching the upstream identifiers, ticket filter will allow you to detect additional terms in the subject that, if detected, will update the ticket status to solved. This feature will ensure that false positive monitoring notifications, or tickets being closed upstream will also be closed in GLPI.

How to install

  • Make sure your installation runs on at least PHP8.
  • Download the latest release from GitHub.
  • Rename the folder inside the zipfile to ticketfilter (i didnt strip the version... yet)
  • Copy the ticketfilter folder into the GLPI_ROOT/marketplace/ folder.
  • Open the GLPI plugins page and install the ticketfilter plugin.
  • Click the config box or browse to Setup > Dropdowns > Ticketfilter > Filterpatterns to configure the patterns you want ticketfilter to match.

What does the plugin do?

Each time a ticket is created by GLPI, either manually or by the mailgate, the plugin in called before the ticket is processed. Ticketfilter will then load all the patterns configured in the ticketfilter dropdown. After loading the patterns it start evaluating these patterns using regular expression match against the ticket title (or email subject). If one of the configured patterns matches, it will use the found pattern to perform a search in the ticketpool (not deleted). If one or multiple tickets are found it will add the ticket being processed as an followup to those tickets. After the followup(s) is/are added it will prevent GLPI from creating a new ticket.

Each time a matched ticket is being processed, it will perform additional evaluations. For example it will evaluate the current status of the found ticket. If the ticket is closed, and the given pattern config allow to reopen, it will add the followup to the closed ticket and reopen it with the status 'NEW.' It will also evaluate if it needs to suppress notifications on adding followups. Finally it evaluates the solved pattern in the given ticket title/email subject. If the additional term (for example 'Closed') is found, it will additionally update the ticket status to solved. The plugin will perform these evaluations on each of the tickets found with the configured ticket match string.

How to create a pattern?

Ticketfilter uses regular expressions as patterns to be evaluated. These patterns can be created and tested using https://regex101.com/r/htaEx7/1. This link also includes an example to work from. Please consider the following:

  • The ticket expressions used MUST include a named matchgroup called 'match' i.e. ...(?<match>PATTERN)...
  • The all expression should include the regex delimiters i.e. /.../
  • The following match all expressions should not be used /(?<match>.*)/ or /(?<match>.+)/
  • It is VERY IMPORTANT that the matchstring will only match UNIQUE identifier for example '[GLPI #12345]' matching something generic will result in multiple unintended tickets to be matched and processed!
  • You are able to test you patterns by manually adding tickets with the configured pattern.

Need help?

  • Simply ask by creating an issue
  • Also used for bugs and suggestions for new features or helping me prioritize

Do you like to plugin and want more

Assign me some 💫 stars here and on the plugin page for my stargazer achievements 💪

Feeling gracious? Buying me caffee is very motivational ☕ https://www.buymeacoffee.com/DonutsNL

Uncertainties and possible issues

  1. This plugin is manually tested and might still have bugs;
  2. Configuring generic matchstrings like /(?.*)/ might just work but might also fail hard, so always test before flight!

ticketfilter's People

Contributors

donutsnl avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

ticketfilter's Issues

filter same ticket with same object

Good morning,

I would like to know if you have an idea or the order in question.
I would like the plugin to be able to analyze the objects and if there is the same object, put it in the ticket concerned.
Currently, all emails arrive in the same ticket...
thanks in advance

Option to ignore locally created tickets

Currently TicketFilter will also evaluate tickets created in the GLPI interface. If the matchstring is found it will process the new ticket as an update on the found tickets. Toggling this option will cause TicketFilter to find multiple tickets and the user should consider the implications of this as well. As multiple tickets might get updated with received emails containing the match string.

Intall error

Hello I have a lot of pluggins installed, but for this plugn i have this error:
image

Thankyou

Resolve not working

Hi
It seem's that the plugin isn't putting the ticket at the resolved status for this string inside the subjects

string "L'incident num INC0034498, Disfonctionnement des MAPs PRTG a été clôturé."

ticket match string : /.?(?(RITM|INC)[0-9]{7})./
Solved match string : /.?(?(RESOLU |clôturé|Clôturé)./

image

many thank for help on this.

PROBLEME ON CREATING AND UPGRADE

Here's what we have done:

==========
Creation One filter with match string /.?(?(RITM|INC)[0-9]{7,7})./ and resolve string /.?(?RESOLU)./
Active : yes
Ticket matched string 11
Solved matched groupe length : 6

The we create à Ticket witch subject RITM0000999 ==> we have then a white page ....

is we de activate and create the ticket manualy and reactivite the plugin to then try do have à Follow Up created ==> same white page ...

Any idea ?

Option to also match requesters on same Subject (matched) but Different Senders

Issue Description:
Even when the subject is the same, but the sender is different, the system is adding the same follow-up to tickets from different senders.

Example:
I have two tickets:

Ticket #2001123 - FW: Wazuh notification - (SVRSTO01) any - Alert level 12
Sender: [[email protected]]

Ticket #2001002 - FW: Wazuh notification - (SVRSTO01) any - Alert level 12
Sender: [[email protected]]

If a new email comes from the sender [email protected] with the same subject "FW: Wazuh notification - (SVRSTO01) any - Alert level 12," the ticket filter adds a follow-up to both earlier tickets, #2001123 and #2001002. However, it should consider the sender and not add a follow-up to #2001002 since the sender is different.

I hope this clarifies the issue.

Prevent TicketFilter from updating tickets if multiple matches are made

In some scenario's you might want to explicitly prevent TicketFilter from updating all found tickets as this might cause unintended information leaks. This should be an configurable option inside the matchrule. The outcome should be that the ticket is ignored and follows the regular ticket flow creating a potential duplicate.

Consideration: we could allow the plugin to add the followups with the 'private' flag if multiple tickets are found.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.