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

(-)a/Koha/REST/V1/Biblios.pm (-2 / +2 lines)
Lines 255-261 sub get_items { Link Here
255
    # Deletion of parameter to avoid filtering on the items table in the case of bookings on 'itemtype'
255
    # Deletion of parameter to avoid filtering on the items table in the case of bookings on 'itemtype'
256
    $c->req->params->remove('bookable');
256
    $c->req->params->remove('bookable');
257
257
258
    my $group_by_status = $c->param('group_by_status');
258
    my $group_by_status = $c->param('group_by_status') ? 1 : 0;
259
    $c->req->params->remove('group_by_status');
259
    $c->req->params->remove('group_by_status');
260
260
261
    return $c->render_resource_not_found("Bibliographic record")
261
    return $c->render_resource_not_found("Bibliographic record")
Lines 274-280 sub get_items { Link Here
274
            $items_rs = $items_rs->search(
274
            $items_rs = $items_rs->search(
275
                {},
275
                {},
276
                {
276
                {
277
                   order_by => [
277
                    order_by => [
278
                        \[ "CASE
278
                        \[ "CASE
279
                                WHEN (withdrawn != 0) THEN '10_Withdrawn'
279
                                WHEN (withdrawn != 0) THEN '10_Withdrawn'
280
                                WHEN (itemlost != 0) THEN '09_Lost'
280
                                WHEN (itemlost != 0) THEN '09_Lost'
(-)a/api/v1/swagger/paths/biblios.yaml (-5 / +1 lines)
Lines 494-509 Link Here
494
      - $ref: "../swagger.yaml#/parameters/q_param"
494
      - $ref: "../swagger.yaml#/parameters/q_param"
495
      - $ref: "../swagger.yaml#/parameters/q_body"
495
      - $ref: "../swagger.yaml#/parameters/q_body"
496
      - $ref: "../swagger.yaml#/parameters/request_id_header"
496
      - $ref: "../swagger.yaml#/parameters/request_id_header"
497
      - $ref: "../swagger.yaml#/parameters/group_by_status"
497
      - name: bookable
498
      - name: bookable
498
        in: query
499
        in: query
499
        description: Limit to items that are bookable
500
        description: Limit to items that are bookable
500
        required: false
501
        required: false
501
        type: boolean
502
        type: boolean
502
      - name: group_by_status
503
        in: query
504
        description: Return the items grouped by status
505
        required: false
506
        type: boolean
507
    consumes:
503
    consumes:
508
      - application/json
504
      - application/json
509
    produces:
505
    produces:
(-)a/api/v1/swagger/swagger.yaml (+6 lines)
Lines 933-938 parameters: Link Here
933
    name: _per_page
933
    name: _per_page
934
    required: false
934
    required: false
935
    type: integer
935
    type: integer
936
  group_by_status:
937
    name: group_by_status
938
    in: query
939
    description: "Return the items grouped by status"
940
    required: false
941
    type: boolean
936
  preservation_processing_id_pp:
942
  preservation_processing_id_pp:
937
    description: processing internal identifier
943
    description: processing internal identifier
938
    in: path
944
    in: path
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc (-1 / +4 lines)
Lines 381-386 Link Here
381
            };
381
            };
382
382
383
            if (is_grouping) {
383
            if (is_grouping) {
384
                dt_options["ordering"]= false;
384
                dt_options["rowGroup"] = {
385
                dt_options["rowGroup"] = {
385
                    "dataSrc": function(row) {
386
                    "dataSrc": function(row) {
386
                        return get_display_status(row, true);
387
                        return get_display_status(row, true);
Lines 633-638 Link Here
633
                    searchable: false,
634
                    searchable: false,
634
                    orderable: false,
635
                    orderable: false,
635
                    render: function (data, type, row, meta) {
636
                    render: function (data, type, row, meta) {
637
                        if (type === 'sort' || type === 'filter' || type === 'type') {
638
                            return get_display_status(row, true); 
639
                        }
636
                        let nodes = "";
640
                        let nodes = "";
637
                        row._status.forEach( status => {
641
                        row._status.forEach( status => {
638
                            if ( status == 'checked_out' || status == 'local_use') {
642
                            if ( status == 'checked_out' || status == 'local_use') {
639
- 

Return to bug 38122