{
  "$schema": "https://datapackage.org/profiles/2.0/tableschema.json",
  "title": "Issue",
  "description": "An issue in Redmine. It is datamodels.jp's Task under Redmine's name: the short name is Issue, the type IRI is Task's (https://datamodels.jp/ns/task/Task), so applications that know Task read it as a Task. State and priority follow RFC 8984 (JSCalendar); the Redmine status name and tracker are kept in statusLabel and subtype. Location may be any geometry. At least one of progress, statusLabel is needed.",
  "x-type": "Issue",
  "x-typeIri": "https://datamodels.jp/ns/task/Task",
  "x-version": "0.2.0",
  "x-schema": "https://models.gtt-project.org/schema/redmine/Issue/v0.2.0.json",
  "x-context": "https://models.gtt-project.org/context/redmine/v0.jsonld",
  "fields": [
    {
      "name": "id",
      "title": "Entity id",
      "description": "Entity id: a URI, for example urn:ngsi-ld:Issue:001",
      "type": "string",
      "constraints": {
        "required": true,
        "unique": true
      }
    },
    {
      "name": "name",
      "title": "Name or subject",
      "description": "Name or subject",
      "type": "string",
      "x-iri": "https://uri.etsi.org/ngsi-ld/name",
      "constraints": {
        "required": true
      }
    },
    {
      "name": "description",
      "title": "Description",
      "description": "Description",
      "type": "string",
      "x-iri": "http://purl.org/dc/terms/description"
    },
    {
      "name": "project",
      "description": "The project this belongs to, when the source system has projects",
      "type": "string",
      "format": "uri",
      "x-iri": "https://datamodels.jp/ns/task/project"
    },
    {
      "name": "milestone",
      "title": "The milestone",
      "description": "The milestone (version, release) this is planned for",
      "type": "string",
      "format": "uri",
      "x-iri": "https://datamodels.jp/ns/task/milestone"
    },
    {
      "name": "parent",
      "title": "Parent task",
      "description": "Parent task (RFC 8984 relatedTo parent)",
      "type": "string",
      "format": "uri",
      "x-iri": "https://datamodels.jp/ns/task/parent"
    },
    {
      "name": "relatedTo",
      "title": "Related tasks",
      "description": "Related tasks. Always an array in the key-values form, even with one target. The kind of relation (blocks, precedes, duplicates) is left to extensions. Several values separated by ;.",
      "type": "list",
      "itemType": "string",
      "delimiter": ";",
      "x-iri": "https://datamodels.jp/ns/task/relatedTo",
      "constraints": {
        "minLength": 1
      }
    },
    {
      "name": "refersTo",
      "title": "The entity this task is about",
      "description": "The entity this task is about (a report, an asset, a road)",
      "type": "string",
      "format": "uri",
      "x-iri": "https://datamodels.jp/ns/task/refersTo"
    },
    {
      "name": "progress",
      "title": "Normalised state",
      "description": "Normalised state (RFC 8984 progress): needs-action = not started, in-process = in progress, completed = done, failed = failed, cancelled = cancelled. When no value fits, leave it out and give the local wording in statusLabel.",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/task/progress",
      "constraints": {
        "enum": [
          "needs-action",
          "in-process",
          "completed",
          "failed",
          "cancelled"
        ]
      }
    },
    {
      "name": "statusLabel",
      "description": "The source system's own status name, unchanged (for example \"In progress\", \"Resolved\"). Required when progress is left out",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/task/statusLabel",
      "constraints": {
        "minLength": 1
      }
    },
    {
      "name": "subtype",
      "description": "The source system's kind, for example a tracker, an issue type or a category",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/task/subtype"
    },
    {
      "name": "category",
      "description": "The Redmine issue category, a name that the project defines (for example \"Pothole\"), unchanged",
      "type": "string",
      "x-iri": "https://models.gtt-project.org/ns/redmine#category",
      "constraints": {
        "minLength": 1
      }
    },
    {
      "name": "priority",
      "title": "Priority 0 to 9",
      "description": "Priority 0 to 9: 1 highest, 9 lowest, 0 undefined (RFC 8984)",
      "type": "integer",
      "x-iri": "https://datamodels.jp/ns/task/priority",
      "constraints": {
        "minimum": 0,
        "maximum": 9
      }
    },
    {
      "name": "assignee",
      "title": "Assignees",
      "description": "Assignees: person, organisation or team entities, possibly outside this subject. Always an array in the key-values form, even with one target. Several values separated by ;.",
      "type": "list",
      "itemType": "string",
      "delimiter": ";",
      "x-iri": "https://datamodels.jp/ns/task/assignee",
      "constraints": {
        "minLength": 1
      }
    },
    {
      "name": "author",
      "title": "Creator",
      "description": "Creator (a person, organisation or team entity)",
      "type": "string",
      "format": "uri",
      "x-iri": "https://schema.org/author"
    },
    {
      "name": "start",
      "title": "Planned start",
      "description": "Planned start: a date, or a date and time (RFC 8984 start)",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/task/start",
      "constraints": {
        "pattern": "\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?"
      }
    },
    {
      "name": "due",
      "title": "Due",
      "description": "Due: a date, or a date and time (RFC 8984 due)",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/task/due",
      "constraints": {
        "pattern": "\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?"
      }
    },
    {
      "name": "completedAt",
      "title": "When progress became completed",
      "description": "When progress became completed",
      "type": "datetime",
      "x-iri": "https://datamodels.jp/ns/task/completedAt"
    },
    {
      "name": "estimatedDuration",
      "description": "Estimated effort as an ISO 8601 duration, e.g. PT1H30M (RFC 8984 estimatedDuration)",
      "type": "string",
      "x-pattern": "^P(?!$)(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?$",
      "x-iri": "https://datamodels.jp/ns/task/estimatedDuration"
    },
    {
      "name": "percentComplete",
      "title": "Completion 0 to 100",
      "description": "Completion 0 to 100 (RFC 8984 percentComplete)",
      "type": "integer",
      "x-iri": "https://datamodels.jp/ns/task/percentComplete",
      "constraints": {
        "minimum": 0,
        "maximum": 100
      }
    },
    {
      "name": "keywords",
      "title": "Keywords or labels",
      "description": "Keywords or labels. Several values separated by ;.",
      "type": "list",
      "itemType": "string",
      "delimiter": ";",
      "x-iri": "https://schema.org/keywords"
    },
    {
      "name": "longitude",
      "title": "Longitude of location in WGS 84",
      "description": "Longitude of location in WGS 84 (decimal degrees). For a point, fill longitude and latitude. For any other shape, put the GeoJSON geometry in location and leave them empty.",
      "type": "number",
      "x-iri": "https://uri.etsi.org/ngsi-ld/location",
      "constraints": {
        "minimum": -180,
        "maximum": 180
      }
    },
    {
      "name": "latitude",
      "title": "Latitude of location in WGS 84",
      "description": "Latitude of location in WGS 84 (decimal degrees). For a point, fill longitude and latitude. For any other shape, put the GeoJSON geometry in location and leave them empty.",
      "type": "number",
      "x-iri": "https://uri.etsi.org/ngsi-ld/location",
      "constraints": {
        "minimum": -90,
        "maximum": 90
      }
    },
    {
      "name": "location",
      "title": "Location as any GeoJSON geometry",
      "description": "Location as any GeoJSON geometry: point, line, polygon or a collection. location as a GeoJSON geometry (Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, GeometryCollection), for a shape that is not a point.",
      "type": "geojson",
      "x-iri": "https://uri.etsi.org/ngsi-ld/location"
    },
    {
      "name": "spatialId",
      "title": "Spatial IDs",
      "description": "Spatial IDs (ZFXY) covering the task. Optional. Several values separated by ;.",
      "type": "list",
      "itemType": "string",
      "delimiter": ";",
      "x-iri": "https://datamodels.jp/ns/task/spatialId"
    },
    {
      "name": "isPrivate",
      "title": "true when private",
      "description": "true when private; default false",
      "type": "boolean",
      "x-iri": "https://datamodels.jp/ns/task/isPrivate"
    },
    {
      "name": "source",
      "description": "URL of this object in the system of record",
      "type": "string",
      "format": "uri",
      "x-iri": "https://smart-data-models.github.io/data-models/terms.jsonld#/definitions/source"
    },
    {
      "name": "externalId",
      "title": "Identifier in the system of record",
      "description": "Identifier in the system of record",
      "type": "string",
      "x-iri": "https://datamodels.jp/ns/task/externalId"
    },
    {
      "name": "dateCreated",
      "title": "Creation time in the system of record",
      "description": "Creation time in the system of record (distinct from the broker attribute createdAt)",
      "type": "datetime",
      "x-iri": "https://smart-data-models.github.io/data-models/terms.jsonld#/definitions/dateCreated"
    },
    {
      "name": "dateModified",
      "description": "Last modification time in the system of record",
      "type": "datetime",
      "x-iri": "https://smart-data-models.github.io/data-models/terms.jsonld#/definitions/dateModified"
    }
  ],
  "primaryKey": [
    "id"
  ],
  "missingValues": [
    ""
  ]
}
