| // +----------------------------------------------------------------------+ // include_once(APP_INC_PATH . "class.user.php"); include_once(APP_INC_PATH . "db_access.php"); /** * Custom field backend to assist other backends in dynamically changing the * contents of one field or hiding/showing based on another field. * * @author Bryan Alsdorf */ class Subcategory_Custom_Field_Backend { function getList($fld_id) { $list = array(); $data = $this->getStructuredData(); foreach ($data as $row) { $list += $row['options']; } return $list; } /** * Returns a multi dimension array of data to display. The values listed * in the "keys" array are possible values for the controlling field to display * options from the "options" array. * For example, if you have a field 'name' that you want to display different * options in, depending on the contents of the 'color' field the array should * have the following structure: * array( * array( * "keys" => array("male", "dude"), * "options" => array( * "bryan" => "Bryan", * "joao" => "Joao", * "bob" => "Bob" * ) * ), * array( * "keys" => array("female", "chick"), * "options" => array( * "freya" => "Freya", * "becky" => "Becky", * "sharon" => "Sharon", * "layla" => "Layla" * ) * ) * ); * * @return array An array of data to display */ function getStructuredData() { return array( array( "keys" => array("Enhancement") , "options" => array("Aplicación de Support Packages") ), array( "keys" => array("Incident") , "options" => array("Problema infraestructura regional", "Dificultad en utilizar el sistema", "Requerimiento de configuración de BASIS", "Errores en el sistema", "Mantenimiento de perfil", "Creación de usuario SAP/BW", "Reseteo de password", "BW-Modificación de roles", "BW- Cargar datos de Sapiens a BW", "BW-Tareas de mantenimiento", "BW-Modificación de reportes") ), array( "keys" => array("New Request") , "options" => array("Ajuste de customizing con impacto en template", "Ajuste de WorkBench con impacto en template", "Nuevo Proceso de Negocio con impacto en template", "User Exit con Impacto en template", "Field Exit con Impacto en template", "Aplicación de una nota", "Aplicación de un hot package", "Modificacion de Interfaces / Desarrollos Regionales", "Ajuste de customizing sin impacto en template", "Ajuste de WorkBench sin impacto en template", "Nuevo Proceso de Negocio sin impacto en template", "User Exit sin impacto en template", "Field Exit sin impacto en template", "Nuevo reporte / interfaz", "Aplicación de una nota de impuestos locales", "Aplicación de hot package de impuestos locales", "User Exit sin impacto en template de impuestos", "Field Exit sin impacto en template de impuestos", "Ajuste de Customizing por impuestos", "Ajuste de Reporte / Interfaz por impuestos", "Nuevo Reporte / Interfaz por impuestos", "Nuevo Query / Cambio en query", "Nuevo InfoCubo / Cambio", "Nuevo usuario / perfil para BW", "Configuración de Jobs R/3", "Nuevo Des. Aplicación General Sin Imp", "Ajuste de Formularios sin Imp", "BW-Ajustar el modelo actual", "BW-Nuevo KPI - incluye reportes", "BW- Implementar el acceso a nuevos usuarios", "BW-Parametrización técnica+ajuste/crear modelo" ) ) ); } /** * Returns the ID of the "controlling" custom field. * * @return integer The ID of the controlling custom field */ function getControllingCustomFieldID() { return 1; } /** * Returns the name of the "controlling" custom field. * * @return string The name of the controlling custom field */ function getControllingCustomFieldName() { return 'BugType'; } /** * Returns true if this row should be hidden if it has no value * * @return boolean True if this field should be hidden before options are set */ function hideWhenNoOptions() { return true; } } ?>