rt-search-attributes(8)

πŸ“¦
version 4.4.7 Β· 5 versions
, in ubuntu noble

πŸ’– NAME πŸ’–

rt-search-attributes β€” the lil script that goes hunting for RT Attribute objects πŸ”βœ¨ it's part of the Request Tracker reference crew, and yes she ate πŸ’…


🌸 SYNOPSIS 🌸

rt-search-attributes [OPTION] ATTRIBUTE_NAME QUALIFYING_CODE

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so bestie, here's the vibe: this script searches all attributes named ATTRIBUTE_NAME with qualifying code QUALIFYING_CODE, and then prints out the deets of every attribute that matched. no cap, that's it, that's the whole main character moment πŸ‘‘

so QUALIFYING_CODE is where you get to be ✨creative✨ because it can use a bunch of variables that call on RT::Attribute's properties:

  • $Id
  • $ObjectType
  • $ObjectId
  • $Name
  • $Description
  • $Content

and $_ is available as shorthand for $Content β€” iykyk, it's giving convenience πŸ’…

πŸŽ€ the flags (they live inside DESCRIPTION, that's just where they are, don't @ me)

  • -c, --content β€” print attribute content πŸ–¨οΈ
  • -h, --help β€” display this help and exit 🫢

🌈 e.g.

rt-search-attributes SavedSearch '$id > 10'
rt-search-attributes Search '$_->{Query} =~ /Status/'
literally just copy-paste those and change what you need, bestie. two whole examples, both iconic ⭐

and that's the page!! this was written for perl v5.38.2 and it's dated 2023-10-29, so if you're reading this from the future, hey, hope the vibes are still immaculate πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from