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

(-)a/Koha/Catalog/Concern.pm (+43 lines)
Lines 26-31 Koha::Catalog::Concern - Koha Catalog::Concern Object class Link Here
26
26
27
=head1 API
27
=head1 API
28
28
29
=head2 Class methods
30
31
=cut
32
33
=head3 reporter
34
35
Return the patron who submitted this concern
36
37
=cut
38
39
sub reporter {
40
    my ( $self ) = @_;
41
    my $rs = $self->_result->reporter;
42
    return unless $rs;
43
    return Koha::Patron->_new_from_dbic( $rs );
44
}
45
46
=head3 resolver
47
48
Return the user who resolved this concern
49
50
=cut
51
52
sub resolver {
53
    my ( $self ) = @_;
54
    my $rs = $self->_result->resolver;
55
    return unless $rs;
56
    return Koha::Patron->_new_from_dbic( $rs ) if $rs;
57
}
58
59
=head3 biblio
60
61
Return the biblio linked to this concern
62
63
=cut
64
65
sub biblio {
66
    my ( $self ) = @_;
67
    my $rs = $self->_result->biblio;
68
    return unless $rs;
69
    return Koha::Biblio->_new_from_dbic( $rs );
70
}
71
29
=head2 Internal methods
72
=head2 Internal methods
30
73
31
=cut
74
=cut
(-)a/api/v1/swagger/definitions/catalog_concern.yaml (-5 / +20 lines)
Lines 4-29 properties: Link Here
4
  concern_id:
4
  concern_id:
5
    type: integer
5
    type: integer
6
    description: Internal concern identifier
6
    description: Internal concern identifier
7
  added_date:
7
  reported_date:
8
    type:
8
    type:
9
      - string
9
      - string
10
      - "null"
10
      - "null"
11
    format: date-time
11
    format: date-time
12
    description: Date the concern was reported
12
    description: Date the concern was reported
13
  biblio:
14
    type:
15
      - object
16
      - "null"
17
    description: The object representing the biblio the concern is related to
13
  biblio_id:
18
  biblio_id:
14
    type: integer
19
    type: integer
15
    description: Internal identifier for the biblio the concern is related to
20
    description: Internal identifier for the biblio the concern is related to
16
  message:
21
  message:
17
    type: string
22
    type: string
18
    description: Concern details
23
    description: Concern details
19
  patron_id:
24
  reporter:
25
    type:
26
      - object
27
      - "null"
28
    description: The object representing the patron who reported the concern
29
  reporter_id:
20
    type: integer
30
    type: integer
21
    description: Internal identifier for the patron the concern was submitted by
31
    description: Internal identifier for the patron who reported the concern
22
  resolved_by:
32
  resolver:
33
    type:
34
      - object
35
      - "null"
36
    description: The object representing the user who resolved the concern
37
  resolver_id:
23
    type:
38
    type:
24
      - integer
39
      - integer
25
      - "null"
40
      - "null"
26
    description: Internal identifier for the patron the concern was resolved by
41
    description: Internal identifier for the user who resolved the concern
27
  resolved_date:
42
  resolved_date:
28
    type:
43
    type:
29
      - string
44
      - string
(-)a/api/v1/swagger/paths/catalog_concerns.yaml (-1 / +12 lines)
Lines 17-22 Link Here
17
      - $ref: "../swagger.yaml#/parameters/q_body"
17
      - $ref: "../swagger.yaml#/parameters/q_body"
18
      - $ref: "../swagger.yaml#/parameters/q_header"
18
      - $ref: "../swagger.yaml#/parameters/q_header"
19
      - $ref: "../swagger.yaml#/parameters/request_id_header"
19
      - $ref: "../swagger.yaml#/parameters/request_id_header"
20
      - name: x-koha-embed
21
        in: header
22
        required: false
23
        description: Embed list sent as a request header
24
        type: array
25
        items:
26
          type: string
27
          enum:
28
            - reporter
29
            - resolver
30
            - biblio
31
        collectionFormat: csv
20
    responses:
32
    responses:
21
      "200":
33
      "200":
22
        description: A list of concerns
34
        description: A list of concerns
23
- 

Return to bug 31028