1RT::Client::REST::TransUascetrioCno(n3t)ributed Perl DocRuTm:e:nCtlaiteinotn::REST::Transaction(3)
2
3
4
6 RT::Client::REST::Transaction - transaction object representation.
7
9 version 0.72
10
12 my $transactions = $ticket->transactions;
13
14 my $count = $transactions->count;
15 print "There are $count transactions.\n";
16
17 my $iterator = $transactions->get_iterator;
18 while (my $tr = &$iterator) {
19 print "Id: ", $tr->id, "; Type: ", $tr->type, "\n";
20 }
21
23 A transaction is a second-class citizen, as it does not exist (at least
24 from the current REST protocol implementation) by itself. At the
25 moment, it is always associated with a ticket (see parent_id
26 attribute). Thus, you will rarely retrieve a transaction by itself;
27 instead, you should use transactions() method of
28 RT::Client::REST::Ticket object to get an iterator for all (or some)
29 transactions for that ticket.
30
32 id
33 Numeric ID of the transaction.
34
35 creator
36 Username of the user who created the transaction.
37
38 parent_id
39 Numeric ID of the object the transaction is associated with.
40
41 type
42 Type of the transactions. Please refer to RT::Client::REST
43 documentation for the list of transaction types you can expect this
44 field to contain. Note that there may be some transaction types not
45 (dis)covered yet.
46
47 old_value
48 Old value.
49
50 new_value
51 New value.
52
53 field
54 Name of the field the transaction is describing (if any).
55
56 attachments
57 I have never seen it set to anything yet. (I will some day
58 investigate this).
59
60 created
61 Time when the transaction was created.
62
63 content
64 Actual content of the transaction.
65
66 description
67 Human-readable description of the transaction as provided by RT.
68
69 data
70 Not sure what this is yet.
71
73 RT::Client::REST::Transaction is a read-only object, so you cannot
74 store() it. Also, because it is a second-class citizen, you cannot
75 search() or count() it -- use transactions() method provided by
76 RT::Client::REST::Ticket.
77
78 retrieve
79 To retrieve a transaction, attributes id and parent_id must be set.
80
82 rt_type
83 Returns 'transaction'.
84
86 RT::Client::REST, RT::Client::REST::Ticket,
87 RT::Client::REST::SearchResult.
88
90 Dean Hamstead <dean@fragfest.com.au>
91
93 This software is copyright (c) 2023, 2020 by Dmitri Tikhonov.
94
95 This is free software; you can redistribute it and/or modify it under
96 the same terms as the Perl 5 programming language system itself.
97
98
99
100perl v5.38.0 2023-07-21 RT::Client::REST::Transaction(3)