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

(-)a/Koha/Ticket.pm (+34 lines)
Lines 179-184 sub to_api_mapping { Link Here
179
    return { id => 'ticket_id', };
179
    return { id => 'ticket_id', };
180
}
180
}
181
181
182
=head3 strings_map
183
184
=cut
185
186
sub strings_map {
187
    my ( $self, $params ) = @_;
188
189
    my $strings = {};
190
191
    if ( defined $self->status ) {
192
        my $av = Koha::AuthorisedValues->search(
193
            {
194
                category         => 'TICKET_STATUS',
195
                authorised_value => $self->status,
196
            }
197
        );
198
199
        my $status_str =
200
              $av->count
201
            ? $params->{public}
202
                ? $av->next->opac_description
203
                : $av->next->lib
204
            : $self->status;
205
206
        $strings->{status} = {
207
            category => 'TICKET_STATUS',
208
            str      => $status_str,
209
            type     => 'av',
210
        };
211
    }
212
213
    return $strings;
214
}
215
182
=head3 _type
216
=head3 _type
183
217
184
=cut
218
=cut
(-)a/api/v1/swagger/definitions/ticket.yaml (+5 lines)
Lines 64-69 properties: Link Here
64
      - integer
64
      - integer
65
      - "null"
65
      - "null"
66
    description: Number of updates
66
    description: Number of updates
67
  _strings:
68
    type:
69
      - object
70
      - "null"
71
    description: A list of stringified coded values
67
additionalProperties: false
72
additionalProperties: false
68
required:
73
required:
69
  - title
74
  - title
(-)a/api/v1/swagger/paths/tickets.yaml (+1 lines)
Lines 28-33 Link Here
28
            - resolver
28
            - resolver
29
            - biblio
29
            - biblio
30
            - updates+count
30
            - updates+count
31
            - +strings
31
        collectionFormat: csv
32
        collectionFormat: csv
32
    responses:
33
    responses:
33
      "200":
34
      "200":
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt (-2 / +2 lines)
Lines 102-107 Link Here
102
                    "resolver",
102
                    "resolver",
103
                    "biblio",
103
                    "biblio",
104
                    "updates+count",
104
                    "updates+count",
105
                    "+strings"
105
                ],
106
                ],
106
                'emptyTable': '<div class="dialog message">' + _("Congratulations, there are no catalog concerns.") + '</div>',
107
                'emptyTable': '<div class="dialog message">' + _("Congratulations, there are no catalog concerns.") + '</div>',
107
                "columnDefs": [{
108
                "columnDefs": [{
Lines 166-172 Link Here
166
                                result += '<span class="clearfix">' + $datetime(row.resolved_date) + '</span>';
167
                                result += '<span class="clearfix">' + $datetime(row.resolved_date) + '</span>';
167
                            } else {
168
                            } else {
168
                                if (row.status) {
169
                                if (row.status) {
169
                                    result += row.status;
170
                                    result += row._strings.status ? escape_str(row._strings.status.str) : "";
170
                                } else {
171
                                } else {
171
                                    result += _("Open");
172
                                    result += _("Open");
172
                                }
173
                                }
173
- 

Return to bug 35628