Scrip on-merge condition

Hi there I am wondering if it is possible to make a custom condition which runs when two tickets are merged. The idea here would be to help keep track of multiple tickets for the same issue. I would then need a way to examine both of the tickets in question and adjust the value of the ticket that is being merged into. Is it possible to accomplish something like this?

You can check that the Transaction type is AddLink and the field for the transaction is MergedInto. I just dumped the $self->TransactionObj during a merge to see what it looked like:

RT::Transaction  {
    Parents       RT::Record
    public methods (39) : ACLEquivalenceObjects, Addresses, ApplyQuoteWrap, Attachments, BriefDescription, BriefDescriptionAsHTML, Content, ContentAsMIME, ContentObj, Create, CurrentUserCanSee, CustomFieldLookupType, DeferredRecipients, Delete, Description, FindDependencies, FriendlyObjectType, HasContent, IsInbound, LoadCustomFieldByIdentifier, Message, NewReferenceObject, NewValue, Object, OldReferenceObject, OldValue, PreInflate, QuoteHeader, QuoteWrap, Recipients, Rules, Scrips, Serialize, SquelchMailTo, Subject, Table, Ticket, TicketObj, UpdateCustomFields
    private methods (13) : __DependsOn, _Attach, _CacheConfig, _CoreAccessible, _FindPreferredContentObj, _FormatPrincipal, _FormatUser, _IsDisplayableTextualContentType, _OverlayAccessible, _ProcessReturnValues, _ReferenceObject, _Set, _Value
    internals: {
        _class                               "RT::Transaction",
        _SB_Record_Primary_RecordCache_key   undef,
        fetched                              {
            created         1,
            creator         1,
            data            1,
            field           1,
            id              1,
            newreference    1,
            newvalue        1,
            objectid        1,
            objecttype      1,
            oldreference    1,
            oldvalue        1,
            referencetype   1,
            timetaken       1,
            type            1
        original_user                        undef,
        table                                "Transactions",
        user                                 RT::CurrentUser,
        values                               {
            created         "2021-12-13 20:15:30",
            creator         14,
            data            undef,
            field           "MergedInto",
            id              598,
            newreference    undef,
            newvalue        "",
            objectid        3,
            objecttype      "RT::Ticket",
            oldreference    undef,
            oldvalue        undef,
            referencetype   undef,
            timetaken       0,
            type            "AddLink"