View | Details | Raw Unified | Return to bug 22440
Collapse All | Expand All

(-)a/Koha/Illrequest.pm (-8 / +53 lines)
Lines 192-197 sub illcomments { Link Here
192
    );
192
    );
193
}
193
}
194
194
195
=head3 comments
196
197
    my $ill_comments = $req->comments;
198
199
Returns a I<Koha::Illcomments> resultset for the linked comments.
200
201
=cut
202
203
sub comments {
204
    my ( $self ) = @_;
205
    return Koha::Illcomments->_new_from_dbic(
206
        scalar $self->_result->comments
207
    );
208
}
209
195
=head3 logs
210
=head3 logs
196
211
197
=cut
212
=cut
Lines 204-215 sub logs { Link Here
204
219
205
=head3 patron
220
=head3 patron
206
221
222
    my $patron = $request->patron;
223
224
Returns the linked I<Koha::Patron> object.
225
207
=cut
226
=cut
208
227
209
sub patron {
228
sub patron {
210
    my ( $self ) = @_;
229
    my ( $self ) = @_;
211
    return Koha::Patron->_new_from_dbic(
230
212
        scalar $self->_result->borrowernumber
231
    return Koha::Patron->_new_from_dbic( scalar $self->_result->patron );
232
}
233
234
=head3 library
235
236
    my $library = $request->library;
237
238
Returns the linked I<Koha::Library> object.
239
240
=cut
241
242
sub library {
243
    my ($self) = @_;
244
245
    return Koha::Library->_new_from_dbic( scalar $self->_result->library );
246
}
247
248
=head3 ill_extended_attributes
249
250
    my $ill_extended_attributes = $request->ill_extended_attributes;
251
252
Returns the linked I<Koha::Illrequestattributes> resultset object.
253
254
=cut
255
256
sub ill_extended_attributes {
257
    my ( $self ) = @_;
258
259
    return Koha::Illrequestattributes->_new_from_dbic(
260
        scalar $self->_result->ill_extended_attributes
213
    );
261
    );
214
}
262
}
215
263
Lines 1142-1153 or undef if none exists Link Here
1142
1190
1143
sub biblio {
1191
sub biblio {
1144
    my ( $self ) = @_;
1192
    my ( $self ) = @_;
1145
1193
    my $biblio_rs = $self->_result->biblio;
1146
    return if !$self->biblio_id;
1194
    return unless $biblio_rs;
1147
1195
    return Koha::Biblio->_new_from_dbic($biblio_rs);
1148
    return Koha::Biblios->find({
1149
        biblionumber => $self->biblio_id
1150
    });
1151
}
1196
}
1152
1197
1153
=head3 check_out
1198
=head3 check_out
(-)a/Koha/Illrequestattribute.pm (-2 / +14 lines)
Lines 31-38 Koha::Illrequestattribute - Koha Illrequestattribute Object class Link Here
31
31
32
=head2 Internal methods
32
=head2 Internal methods
33
33
34
=cut
35
36
=head3 _type
34
=head3 _type
37
35
38
=cut
36
=cut
Lines 41-46 sub _type { Link Here
41
    return 'Illrequestattribute';
39
    return 'Illrequestattribute';
42
}
40
}
43
41
42
=head3 to_api_mapping
43
44
This method returns the mapping for representing a Koha::Illrequestattribute object
45
on the API.
46
47
=cut
48
49
sub to_api_mapping {
50
    return {
51
        illrequest_id => 'ill_request_id',
52
        readonly      => 'read_only',
53
    };
54
}
55
44
=head1 AUTHOR
56
=head1 AUTHOR
45
57
46
Alex Sassmannshausen <alex.sassmannshausen@ptfs-europe.com>
58
Alex Sassmannshausen <alex.sassmannshausen@ptfs-europe.com>
(-)a/Koha/Schema/Result/Illrequest.pm (-2 / +32 lines)
Lines 334-339 __PACKAGE__->belongs_to( Link Here
334
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-06-23 18:44:13
334
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-06-23 18:44:13
335
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:on9OCRON/U0uR+m9aPIKPg
335
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:on9OCRON/U0uR+m9aPIKPg
336
336
337
__PACKAGE__->has_many(
338
  "comments",
339
  "Koha::Schema::Result::Illcomment",
340
  { "foreign.illrequest_id" => "self.illrequest_id" },
341
  { cascade_copy => 0, cascade_delete => 0 },
342
);
343
344
__PACKAGE__->has_many(
345
  "ill_extended_attributes",
346
  "Koha::Schema::Result::Illrequestattribute",
347
  { "foreign.illrequest_id" => "self.illrequest_id" },
348
  { cascade_copy => 0, cascade_delete => 0 },
349
);
350
351
__PACKAGE__->belongs_to(
352
  "library",
353
  "Koha::Schema::Result::Branch",
354
  { branchcode => "branchcode" },
355
  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
356
);
357
358
__PACKAGE__->belongs_to(
359
  "patron",
360
  "Koha::Schema::Result::Borrower",
361
  { borrowernumber => "borrowernumber" },
362
  {
363
    is_deferrable => 1,
364
    join_type     => "LEFT",
365
    on_delete     => "CASCADE",
366
    on_update     => "CASCADE",
367
  },
368
);
337
369
338
# You can replace this text with custom code or comments, and it will be preserved on regeneration
339
1;
370
1;
340
- 

Return to bug 22440