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

πŸ“¦
version 0.05 Β· 2 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

okay bestie, welcome to the RT-Extension-AssetAutoName page β€” this is RT::Ex...toName(3pm) if you're being all formal about it, from the User Contributed Perl Documentation crew. and what does it do?? it auto generates a name for an asset ✨ like, you don't name it, the extension names it, slay.


🌸 DESCRIPTION 🌸

so here's the tea πŸ“: this extension lets you define templates to use for asset categories, and those templates get used whenever no name is set on an asset. you can use this to generate the name based on CustomFields (or other values). lowkey iconic, ngl.

fr fr, 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 the way that those should be stored individually as Custom Fields to ease searching and reporting?? obsessed. πŸ’…


⭐ RT VERSION ⭐

works with RT 4.4.x and 5.0.x. periodt. πŸ‘‘


πŸŽ€ INSTALLATION πŸŽ€

okay bestie, here's the whole vibe check, step by step:

  1. run these:
perl Makefile.PL
make
make install
heads up!! you may need root permissions for that last one πŸ™ˆ
  1. edit your /opt/rt4/etc/RT_SiteConfig.pm β€” yes, that exact file, don't come for me β€” and add this line:
Plugin('RT::Extension::AssetAutoName');
  1. then add templates for the categories you'd like to have use this extension:
Set( %AssetAutoName, 2 => 'Card: __CF.28__ (__Status__)' );

so like, 28 is the CustomField to use, and you can also specify the name here. πŸ’–

and if the CustomField is a multi-value?? only the first value is used. that's it. that's the rule. 🫢
  1. clear your mason cache:
rm -rf /opt/rt4/var/mason_data/obj
  1. restart your webserver. and then you're done, main character energy achieved 🌈

πŸ’… 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. ✨

and ngl, 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. iykyk 😭


πŸ‘‘ 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

okay that's the whole page bestie, you ate that πŸ“βœ¨ and just so you know where this came from: it's the perl v5.40.1 docs, dated 2025-03-15, for the RT::Ex...toName(3pm) page. go forth and name some assets, queen πŸ’–πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from