Requête de recherche des données administratives

Bug #931373 reported by FreeStorm
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OCS Inventory: OCSReports
Fix Released
Medium
Arthur Jaouen

Bug Description

Lorsque l'on insert plusieurs champs de type SELECT avec le même texte au début du noms du champs , les donnée sont mal affichées lorsque l'on veut sélectionner les données dans les propriétés d'un ordinateur.
Par exemple:
Ont créé 2 champs administratif de type SELECT:
- SWITCH libellé: Switch
- SWITCHPORT libellé: Port du switch

Ensuite on insert des données pour ces champs via les propriétés d'un ordinateur:
"Port du Switch"=> 48
"Switch"=> SW01-P01-01S

Les données ont bien été insérées dans le table `config`:
Name IVALUE TVALUE
ACCOUNT_VALUE_SWITCHPORT_1 1 48
ACCOUNT_VALUE_SWITCH_1 1 SW01-P01-01S

Par contre le formulaire affichera les données suivantes pour les deux champs
- 48
- SW01-P01-01S

Le problème semble venir des requête de recherche des donnée administratives:
Par exemple:

$queryDetails ="select IVALUE,TVALUE from config where name like '".$protectedGet['tag']."_%'";
Ce qui nous donne : select IVALUE,TVALUE from config where name like 'ACCOUNT_VALUE_SWITCH_%
donc retourne: "SW01-P01-01S" et "1"

La requête devrait ressembler à :
select IVALUE,TVALUE from config where name like '".$protectedGet['tag']."\_%'

Revision history for this message
FreeStorm (freestorm) wrote :
mortheres (mortheres)
affects: ocsinventory-server → ocsinventory-ocsreports
Changed in ocsinventory-ocsreports:
assignee: nobody → Erwan (airoine)
Arthur Jaouen (arthur-z)
Changed in ocsinventory-ocsreports:
assignee: Erwan (airoine) → Arthur Jaouen (arthur-z)
importance: Undecided → Medium
Arthur Jaouen (arthur-z)
Changed in ocsinventory-ocsreports:
status: New → In Progress
Arthur Jaouen (arthur-z)
Changed in ocsinventory-ocsreports:
status: In Progress → Fix Committed
Arthur Jaouen (arthur-z)
Changed in ocsinventory-ocsreports:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Patches

Remote bug watches

Bug watches keep track of this bug in other bug trackers.