Reporting fields

This chapter focuses on reporting fields. There are 7 reporting fields which can be bound to Jira fields, they are identified by their name in SquashTm: testingStatus, redactionProgress, verificationProgress, validationProgress, redactionRatio, verificationRatio, validationRatio.

Get reporting field

A GET to /projects/{id}/reporting-fields/{squashField} returns the reporting field with the given squash field.

Path parameters

Table 1. /api/rest/latest/projects/{id}/reporting-fields/{squashField}
Parameter Description

id

the id of the project

squashField

the name of the reporting field in squash

HTTP request

GET /api/rest/latest/projects/17/reporting-fields/validationProgress HTTP/1.1
Accept: application/json
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 258

{
  "_type" : "reporting-field",
  "squash_field" : "validationProgress",
  "jira_field" : "Validation Progress",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/17/reporting-fields/validationProgress"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

squash_field

String

the name of the reporting field in squash

jira_field

String

the name of the reporting field in jira

_links

Object

related links

Relation Description

self

link to this reporting field

Get all reporting fields

A GET to /projects/{id}/reporting-fields returns all the reporting fields of the given project.

HTTP request

GET /api/rest/latest/projects/13/reporting-fields HTTP/1.1
Accept: application/json
Host: localhost:8080

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2312

{
  "_embedded" : {
    "reporting-fields" : [ {
      "_type" : "reporting-field",
      "squash_field" : "testingStatus",
      "jira_field" : "Testing Status",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/13/reporting-fields/testingStatus"
        }
      }
    }, {
      "_type" : "reporting-field",
      "squash_field" : "redactionProgress",
      "jira_field" : "Redaction Progress",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/13/reporting-fields/redactionProgress"
        }
      }
    }, {
      "_type" : "reporting-field",
      "squash_field" : "verificationProgress",
      "jira_field" : "Verification Progress",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/13/reporting-fields/verificationProgress"
        }
      }
    }, {
      "_type" : "reporting-field",
      "squash_field" : "validationProgress",
      "jira_field" : "Validation Progress",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/13/reporting-fields/validationProgress"
        }
      }
    }, {
      "_type" : "reporting-field",
      "squash_field" : "redactionRatio",
      "jira_field" : "Redaction Ratio",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/13/reporting-fields/redactionRatio"
        }
      }
    }, {
      "_type" : "reporting-field",
      "squash_field" : "verificationRatio",
      "jira_field" : "Verification Ratio",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/13/reporting-fields/verificationRatio"
        }
      }
    }, {
      "_type" : "reporting-field",
      "squash_field" : "validationRatio",
      "jira_field" : "Validation Ratio",
      "_links" : {
        "self" : {
          "href" : "http://localhost:8080/api/rest/latest/projects/13/reporting-fields/validationRatio"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/13/reporting-fields"
    }
  },
  "page" : {
    "size" : 7,
    "totalElements" : 7,
    "totalPages" : 1,
    "number" : 0
  }
}

Response fields

Path Type Description

_embedded.reporting-fields

Array

the list of elements for that page

page.size

Number

the page size for that query

page.totalElements

Number

total number of elements the client is allowed to read

page.totalPages

Number

how many pages can be browsed

page.number

Number

the page number

_links

Object

related links

Relation Description

first

link to the first page (optional)

prev

link to the previous page (optional)

self

link to this page

next

link to the next page (optional)

last

link to the last page (optional)

Modify reporting field

A PATCH to /projects/{id}/reporting-fields/{squashField} modifies the reporting field with the given squash field.

HTTP request

PATCH /api/rest/latest/projects/12/reporting-fields/redactionRatio HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 68
Host: localhost:8080

{
  "_type" : "reporting-field",
  "jira_field" : "RedactionRatio"
}

Path parameters

Table 1. /api/rest/latest/projects/{id}/reporting-fields/{squashField}
Parameter Description

id

the id of the project

squashField

the name of the reporting field in squash

HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 246

{
  "_type" : "reporting-field",
  "squash_field" : "redactionRatio",
  "jira_field" : "Redaction Ratio",
  "_links" : {
    "self" : {
      "href" : "http://localhost:8080/api/rest/latest/projects/12/reporting-fields/redactionRatio"
    }
  }
}

Response fields

Path Type Description

_type

String

the type of the entity

squash_field

String

the name of the reporting field in squash

jira_field

String

the name of the reporting field in jira

_links

Object

related links

Relation Description

self

link to this reporting field