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

(-)a/Koha/Item.pm (-3 / +3 lines)
Lines 470-482 sub checkout { Link Here
470
    return Koha::Checkout->_new_from_dbic( $checkout_rs );
470
    return Koha::Checkout->_new_from_dbic( $checkout_rs );
471
}
471
}
472
472
473
=head3 serialitem
473
=head3 serial_item
474
474
475
=cut
475
=cut
476
476
477
sub serialitem {
477
sub serial_item {
478
    my ( $self ) = @_;
478
    my ( $self ) = @_;
479
    my $rs = $self->_result->serialitem;
479
    my $rs = $self->_result->serial_item;
480
    return unless $rs;
480
    return unless $rs;
481
    return Koha::Serial::Item->_new_from_dbic($rs);
481
    return Koha::Serial::Item->_new_from_dbic($rs);
482
}
482
}
(-)a/Koha/Schema/Result/Item.pm (+7 lines)
Lines 1062-1067 __PACKAGE__->might_have( Link Here
1062
  { cascade_copy => 0, cascade_delete => 0 },
1062
  { cascade_copy => 0, cascade_delete => 0 },
1063
);
1063
);
1064
1064
1065
__PACKAGE__->might_have(
1066
  "serial_item",
1067
  "Koha::Schema::Result::Serialitem",
1068
  { "foreign.itemnumber" => "self.itemnumber" },
1069
  { cascade_copy => 0, cascade_delete => 0 },
1070
);
1071
1065
use C4::Context;
1072
use C4::Context;
1066
sub effective_itemtype {
1073
sub effective_itemtype {
1067
    my ( $self ) = @_;
1074
    my ( $self ) = @_;
(-)a/api/v1/swagger/definitions/item.yaml (-1 / +1 lines)
Lines 246-252 properties: Link Here
246
    type:
246
    type:
247
      - object
247
      - object
248
      - "null"
248
      - "null"
249
  serialitem:
249
  serial_item:
250
    type:
250
    type:
251
      - object
251
      - object
252
      - "null"
252
      - "null"
(-)a/api/v1/swagger/paths/biblios.yaml (-1 / +1 lines)
Lines 446-452 Link Here
446
            - analytics_count
446
            - analytics_count
447
            - cover_image_ids
447
            - cover_image_ids
448
            - item_group_item.item_group.description
448
            - item_group_item.item_group.description
449
            - serialitem.serial
449
            - serial_item.serial
450
        collectionFormat: csv
450
        collectionFormat: csv
451
      - $ref: "../swagger.yaml#/parameters/match"
451
      - $ref: "../swagger.yaml#/parameters/match"
452
      - $ref: "../swagger.yaml#/parameters/order_by"
452
      - $ref: "../swagger.yaml#/parameters/order_by"
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc (-3 / +2 lines)
Lines 217-223 Link Here
217
        embed.push('item_group_item.item_group.description');
217
        embed.push('item_group_item.item_group.description');
218
    [% END %]
218
    [% END %]
219
    [% IF biblio.serial %]
219
    [% IF biblio.serial %]
220
        embed.push('serialitem.serial');
220
        embed.push('serial_item.serial');
221
    [% END %]
221
    [% END %]
222
    [% IF Koha.Preference('UseRecalls') %]
222
    [% IF Koha.Preference('UseRecalls') %]
223
        embed.push('recall', 'recall+strings', 'recall.patron')
223
        embed.push('recall', 'recall+strings', 'recall.patron')
Lines 428-434 Link Here
428
                render: function (data, type, row, meta) {
428
                render: function (data, type, row, meta) {
429
                    let nodes = "";
429
                    let nodes = "";
430
                    [%# FIXME Previously we displayed the column if at least one item of the biblio had an enumchron/serial_issue_number. Now it's only if one item of the ones displayed on the current page, how is that bad? How can it be fixed in an elegant way? Should we display the column only if biblio.serial? %]
430
                    [%# FIXME Previously we displayed the column if at least one item of the biblio had an enumchron/serial_issue_number. Now it's only if one item of the ones displayed on the current page, how is that bad? How can it be fixed in an elegant way? Should we display the column only if biblio.serial? %]
431
                    let serial = row.serialitem ? row.serialitem.serial : null;
431
                    let serial = row.serial_item ? row.serial_item.serial : null;
432
                    if ( row.serial_issue_number && serial && serial.serialseq ) {
432
                    if ( row.serial_issue_number && serial && serial.serialseq ) {
433
                        nodes += '<span class="enum">%s</span>'.format(escape_str(row.serial_issue_number));
433
                        nodes += '<span class="enum">%s</span>'.format(escape_str(row.serial_issue_number));
434
                        if ( serial.serialseq && row.serial_issue_number != serial.serialseq ) {
434
                        if ( serial.serialseq && row.serial_issue_number != serial.serialseq ) {
435
- 

Return to bug 33568