Linking Assets to tickets

33 views
Skip to first unread message

rem...@gmail.com

unread,
Oct 31, 2013, 3:52:31 PM10/31/13
to at-u...@googlegroups.com
Ok So I have managed to create a CF from a list of Assets

I have this CF set on a queue so when a ticket is created we can associate Assets to tickets that we create, but the issue I have is when I go and view the Asset the ticket I created is not linked back to the Asset.

How can I get this to link automatically from the ticket I created back to the Asset?

Thanks

gfranzini

unread,
Nov 5, 2013, 9:47:00 AM11/5/13
to at-u...@googlegroups.com
Not tried myself, but you could define for that queue a Scrip with OnCreate condition and Custom action, adapting some other piece of AT code used for creation of links... That approach would only work at creation of the ticket, not if you add the CF value later; and clearing the CF afterwards would not clear the link either. You would need more Scrips for those situations.
 
G.

Brumm, Torsten / Kuehne + Nagel / Ham GI-ID

unread,
Nov 5, 2013, 10:12:42 AM11/5/13
to at-u...@googlegroups.com

Try this piece of code as example:

 

my $new_value = lc $self->TicketObj->FirstCustomFieldValue('System');

my $asset = RTx::AssetTracker::Asset->new($self->CurrentUser);

my ($id,$msg) = $asset->Load($new_value);

if (! $id) {

   $RT::Logger->debug("TBRUMMASSET LINK: Could not load asset $new_value: $msg");

   return 0;

}

($id,$msg) = $self->TicketObj->AddLink(Type => 'RefersTo', Target => $asset->URI);

if (! $id) {

   $RT::Logger->debug("TBRUMMASSET LINK: Could not AddLink: $msg");

   return 0;

}

 

1;

--
You received this message because you are subscribed to the Google Groups "at-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to at-users+u...@googlegroups.com.
To post to this group, send email to at-u...@googlegroups.com.
Visit this group at http://groups.google.com/group/at-users.
For more options, visit https://groups.google.com/groups/opt_out.


Kühne + Nagel (AG & Co.) KG
Rechtsform: Kommanditgesellschaft, Bremen HRA 21928, USt-IdNr.: DE 812773878.
Geschäftsleitung Kühne + Nagel (AG & Co.) KG: Reiner Heiken (Vors.), Dirk Blesius, Martin Brinkmann, Holger Ketz, Jan-Hendrik Köstergarten, Christian Marnetté, Christian Solf, Jens Wollesen.
Persönlich haftende Gesellschafterin: Kühne & Nagel A.G., Rechtsform: Aktiengesellschaft nach luxemburgischem Recht, HR-Nr.: B 18745, Geschäftsführendes Verwaltungsratsmitglied: Karl Gernandt.
Geschäftsleitung Region Westeuropa: Hans-Georg Brinkmann (Vors.), Yngve Ruud (Stellv.), Richard Huhn, Björn Johansson, Bruno Mang, Stefan Paul, Holger Ketz, Dominic Edmonds, Peder Winther.

Wir arbeiten ausschließlich auf Grundlage der Allgemeinen Deutschen Spediteursbedingungen (ADSp), jeweils neuester Fassung. Wir verweisen insbesondere auf die vom Gesetz abweichenden Haftungsbeschränkungen von Ziffer 23 und 24 ADSp. Den vollständigen Text der ADSp übersenden wir Ihnen gerne auf Anfrage und können Sie auch unter http://www.kuehne-nagel.com einsehen. Ergänzend wird vereinbart, dass (1) Ziffer 27 ADSp im Rahmen internationaler Übereinkommen weder unsere Haftung noch die Zurechnung des Verschuldens von Leuten und sonstigen Dritten zu Gunsten des Auftraggebers erweitert, und (2) wir in den im deutschen Seehandelsrecht aufgeführten Fällen des nautischen Verschuldens oder Feuer an Bord nur für eigenes Verschulden und (3) im Sinne der CMNI genannten Voraussetzungen nicht für nautisches Verschulden, Feuer an Bord oder Mängel des Schiffes haften.

Reply all
Reply to author
Forward
0 new messages