Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change location id in allowed_so #692

Merged
merged 4 commits into from
Sep 5, 2023
Merged

Conversation

Aeto-J
Copy link
Contributor

@Aeto-J Aeto-J commented Aug 17, 2023

Change id of location in allowed_so: id 80 is Entity and 83 is Location
replace id 80 by 83
and we use $array (searchoptions) like others datatype

@stonebuzz
Copy link
Contributor

Hi @Aeto-J

it seems that other objects don't share the same id

php tools/getsearchoptions.php --type=Computer | grep Location
    [3] => Characteristics / Location

I have identified this list of objects

  • Enclosure
  • Line
  • Monitor
  • NetworkEquipment
  • PassiveDCEquipement
  • PDU
  • Peripheral
  • Phone
  • Printer
  • Rack
  • Socket
  • Software
  • SoftwareLicense
  • User

Each object call

$tab = array_merge($tab, Location::rawSearchOptionsToAdd());

Which defines this SO on ID 3

        $tab[] = [
            'id'                 => '3',
            'table'              => 'glpi_locations',
            'field'              => 'completename',
            'name'               => Location::getTypeName(1),
            'datatype'           => 'dropdown'
        ];

@cedric-anne what do you think

@cedric-anne cedric-anne added this to the 1.21.1 milestone Sep 4, 2023
@cedric-anne cedric-anne requested review from stonebuzz and removed request for stonebuzz September 5, 2023 08:31
@cedric-anne cedric-anne merged commit a7a8f7d into pluginsGLPI:develop Sep 5, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants