Creating a ReferredToBy Link

Some time lurker, first time poster.
I am trying to make a script which parses an incoming message for text
for RT# and then adds a ReferredToBy link relationship between
the current ticket being posted to, and the ticket id extracted.

I have:

while ($content =~ m!RT#(\d+)!g) {
$self->TicketObj->AddLink(Type=>‘ReferredToBy’, Target=>$1);

But this does not work.

I can do:
while ($content =~ m!RT#(\d+)!g) {
$self->TicketObj->AddLink(Type=>'RefersTo, Base=>$1);
and this works.

Can anyone help with the correct syntax to create the ReferredToBy link?

RT 3.8.2


Not sure why it doesn’t work (did you check the log),
but if you have a form that works, what’s the problem?

A RefersTo B is the same thing as B ReferredToBy A