| Summary | Update on backend with test version of SUB-MAPPINGS |
| Platform | Unix |
| Category | |
| Valid for | 5.0.x, 5.1.x, 5.2.0.x |
| Requires | 434 |
| Client Required Patch/es | |
| Supersedes | 442 |
| Superseded by | |
| Affects | Server: Core |
| Last Updated | September 30, 2009 |
SUB-MAPPINGS: This type of mapping allows to use an ordinary Perl
subroutine to map a classification string into a new string. The
subroutine used is defined in a config file.
Use of SUB-MAPPINGS: Add the usual specification of virtual
classifications in acc_types. Store the mapping file in the usual
directory (/var/opt/openit/etc/mappings). The format of the mapping
file is as follows:
[SUB-MAPPINGS]:
sub {
my( $value ) = @_;
# Some Perl code...
return ...;
}
For instance, a mapping file to split the classification on backslash
and use the last field could look like this:
[SUB-MAPPINGS]:
sub {
my( $value ) = @_;
my $sep = '\\\\'
my @fields = split( $sep, $value );
return pop @fields;
}
(Perl's split is using a regexp, and therefore the backslashes have to
be escaped this way.)
NOTE: If the new virtual classification is added in the
classvar_mapping_config, then a call to generate_classvar_mapping wil
This patch fixes ability to report with top and threshold settings with ABSAVG values, which did not work after patch #434. In addition, the backend supports a directive in openit.cfg for setting precision of values in html reports, like: REPORTS_DECIMAL_DIGITS 3 will set use of three digits in fractional part of values in html reports. A "+" or a "-" can be added to force rounding up or down.
Unpack tar file in e.g /tmp/patch on the Open iT server/client. Do the following as root: cd /tmp/patch ./patch.pl
No corresponding Patches available.