Link_relation table

Moderator: crythias

Locked
mtrissi
Znuny newbie
Posts: 6
Joined: 11 Apr 2020, 01:35
Znuny Version: 6.0.26
Real Name: Mateus

Link_relation table

Post by mtrissi »

Hello!

I'm trying to add a link between a ConfigureItem (a computer) and a ticket. So, I did create one link manually through the OTRS web interface and saw the data at the link_relation table.
Screenshot_2.jpg
Therefore, when I tried to add a link directly to the SQL table, it didn't work, altough the query was ok.
Screenshot_3.jpg
Can someone help me?
You do not have the required permissions to view the files attached to this post.
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Link_relation table

Post by jojo »

never change the database manually! In case you do, you have to delete the caches
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
mtrissi
Znuny newbie
Posts: 6
Joined: 11 Apr 2020, 01:35
Znuny Version: 6.0.26
Real Name: Mateus

Re: Link_relation table

Post by mtrissi »

But I want to add those links through scripting. There is another way without changing the database directly?
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Link_relation table

Post by jojo »

via the internal PERL API: https://doc.otrs.com/doc/api/otrs/6.0/P ... ct.pm.html
via Webservice (additional packages required)
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
mtrissi
Znuny newbie
Posts: 6
Joined: 11 Apr 2020, 01:35
Znuny Version: 6.0.26
Real Name: Mateus

Re: Link_relation table

Post by mtrissi »

Well, I tried following this answer:
https://stackoverflow.com/questions/346 ... -rest-in-o

But it does not work and I don't know what I'm doing wrong.

I created the GenericInterfaceLinkObjectConnector.xml at /opt/otrs/Kernel/Config/Files/XML, but when I go to Sys Config at the otrs GUI, there is no operation LinkAdd there.
ss1.jpg
ss2.jpg
You do not have the required permissions to view the files attached to this post.
zzz
Znuny superhero
Posts: 914
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: Link_relation table

Post by zzz »

Hey,

You have to rebuild to config to load your own .xml file into the system:

bin/otrs.Console.pl Maint::Config::Rebuild --cleanup

— Emin
Professional Znuny and OTRS services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
mtrissi
Znuny newbie
Posts: 6
Joined: 11 Apr 2020, 01:35
Znuny Version: 6.0.26
Real Name: Mateus

Re: Link_relation table

Post by mtrissi »

hey!

I tried it, but it gave me this as response:
ss1.jpg
You do not have the required permissions to view the files attached to this post.
zzz
Znuny superhero
Posts: 914
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: Link_relation table

Post by zzz »

You're using an outdated -version 5 and lower- config syntax.

Your config (which I did not check for correctness) should look like this instead: https://github.com/OTRS/otrs/blob/rel-6 ... erface.xml
Professional Znuny and OTRS services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
mtrissi
Znuny newbie
Posts: 6
Joined: 11 Apr 2020, 01:35
Znuny Version: 6.0.26
Real Name: Mateus

Re: Link_relation table

Post by mtrissi »

Thanks!

After adjusting the xml it worked.

Now I need to add a SOAP request at the wsdl and develop a perl module for it, right?
Locked