cconard96 / glpi-dev-plugin

Provides multiple tools to help core and plugin developers
GNU General Public License v2.0
5 stars 3 forks source link

Add tool to help choose search option ID numbers #11

Open cconard96 opened 2 years ago

cconard96 commented 2 years ago

With the Search Engine (and other parts) using numeric IDs for the "search options" it can be difficult to add new options without conflicting with other options since options may be declared inside an itemtype's class, its parent(s), or brought in from related itemtypes such as Infocom, Locations, etc.

The tool should allow you to enter one or more itemtypes (in case you want options for linked itemtypes and don't want to conflict with any of their core search options) and a number that represents how many IDs you want to use or at least plan for. The tool should then search the current IDs for an available contiguous block of IDs. Ideally, there should be a buffer at the end of the currently used blocks of IDs to help prevent others from stepping on the returned block of IDs in future updates.

It may also be helpful to have a known list of IDs used by some of the more popular plugins so that they don't need to be installed and active at the time.