RT::Ex...toName(3pm)

πŸ“¦ version 0.05, in ubuntu noble

πŸ’– NAME πŸ’–

okay bestie, so this page is about RT::Extension::AssetAutoName β€” an extension that auto-generates a name for an asset. it's the RT::Ex...toName(3pm) manual page, but make it make sense, yk? πŸ¦‹


✨ DESCRIPTION ✨

so here's the vibe: this extension lets you define templates to use for asset categories. those templates get used if no name is set on an asset. and like, that's the whole point β€” you can use it to generate the name based on CustomFields (or other values). lowkey genius. πŸ’…

it was developed for tracking components of servers, where the name should be based on the make, model and serial number of a component. but plot twist: those should be stored individually as Custom Fields, to ease searching and reporting. the way that ✨organization✨ matters.


πŸ‘‘ RT VERSION πŸ‘‘

works with RT 4.4.x and 5.0.x. no notes. 🫢


🌸 INSTALLATION 🌸

  1. perl Makefile.PL
  2. make
  3. make install
    • may need root permissions, so like, be ready for that 😭
  4. edit your /opt/rt4/etc/RT_SiteConfig.pm
    • add this line:
Plugin('RT::Extension::AssetAutoName');
  • add templates for the categories you'd like to have use this extension:
Set( %AssetAutoName, 2 => 'Card: __CF.28__ (__Status__)' );
  • 28 is the CustomField to use, and you can also specify the name here.
  • if the CustomField is a multi-value, then only the first value is used. first one, that's it, periodt. πŸ’€
  1. clear your mason cache:
rm -rf /opt/rt4/var/mason_data/obj
  1. restart your webserver

πŸŽ€ USAGE πŸŽ€

if the asset name is not set, is the empty string, or is just an x, we'll dynamically generate a name based on a template. iconic behaviour honestly. πŸ’œ

and it's 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. so x it is. 😌


🌈 AUTHOR 🌈

Andrew Ruthven, Catalyst Cloud Ltd <puck@catalystcloud.nz<gt>


this software is Copyright (c) 2018-2020 by Catalyst Cloud Ltd.

this is free software, licensed under:

The GNU General Public License, Version 2, June 1991

and that's the whole page, bestie β€” perl v5.36.0, dated 2023-08-26, RT::Ex...toName(3pm). slay, go name some assets. 🧚✨

πŸ“¦ where this page comes from