.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "RT::Extension::AssetAutoName 3pm" .TH RT::Extension::AssetAutoName 3pm "2023-02-25" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" RT\-Extension\-AssetAutoName \- Auto generate a name for an asset .SH "DESCRIPTION" .IX Header "DESCRIPTION" This extension allows you to define templates to use for asset categories that will be used if no name is set on an asset. You can use this to generate the name based on CustomFields (or other values). .PP This was developed for tracking components of servers where the name should be based on the make, model and serial number of a component. Yet these should be stored individually as Custom Fields to ease searching and reporting. .SH "RT VERSION" .IX Header "RT VERSION" Works with \s-1RT 4.4\s0.x and 5.0.x. .SH "INSTALLATION" .IX Header "INSTALLATION" .ie n .IP """perl Makefile.PL""" 4 .el .IP "\f(CWperl Makefile.PL\fR" 4 .IX Item "perl Makefile.PL" .PD 0 .ie n .IP """make""" 4 .el .IP "\f(CWmake\fR" 4 .IX Item "make" .ie n .IP """make install""" 4 .el .IP "\f(CWmake install\fR" 4 .IX Item "make install" .PD May need root permissions .IP "Edit your \fI/opt/rt4/etc/RT_SiteConfig.pm\fR" 4 .IX Item "Edit your /opt/rt4/etc/RT_SiteConfig.pm" Add this line: .Sp .Vb 1 \& Plugin(\*(AqRT::Extension::AssetAutoName\*(Aq); .Ve .Sp Add templates for the categories you'd like to have use this extension: .Sp .Vb 1 \& Set( %AssetAutoName, 2 => \*(AqCard: _\|_CF.28_\|_ (_\|_Status_\|_)\*(Aq ); .Ve .Sp 28 is the CustomField to use, you can also specify the name here. .Sp If the CustomField is a multi-value, then only the first value is used. .IP "Clear your mason cache" 4 .IX Item "Clear your mason cache" .Vb 1 \& rm \-rf /opt/rt4/var/mason_data/obj .Ve .IP "Restart your webserver" 4 .IX Item "Restart your webserver" .SH "USAGE" .IX Header "USAGE" If the asset name is not set, the empty string or just an x, we'll dynamically generate a name based on a template. .PP It is useful to allow 'x' in the case that data is being bulk updated, it has been reported that with some tools setting a short string is easier than deleting the text. .SH "AUTHOR" .IX Header "AUTHOR" Andrew Ruthven, Catalyst Cloud Ltd .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" This software is Copyright (c) 2018\-2020 by Catalyst Cloud Ltd .PP This is free software, licensed under: .PP .Vb 1 \& The GNU General Public License, Version 2, June 1991 .Ve