Skip to content

Commit

Permalink
Merge pull request #23 from SGNL-ai/sc-13244-jira-assets
Browse files Browse the repository at this point in the history
[sc-13244] Add `Workspace` and `Object` entities
  • Loading branch information
shash-sgnl authored Sep 16, 2023
2 parents 7cbd722 + 9420751 commit 54f1c7e
Showing 1 changed file with 109 additions and 1 deletion.
110 changes: 109 additions & 1 deletion jira.sgnl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ type: "Jira-1.0.0"
# empty config: {} | b64: "e30="
# config with issues jql filter: {"issuesJqlFilter":"project=SGNL"} | b64: "eyJpc3N1ZXNKcWxGaWx0ZXIiOiJwcm9qZWN0PVNHTkwifQ=="
# config with issues jql filter with space {"issuesJqlFilter":"project='Customer Support'"} | b64: "eyJpc3N1ZXNKcWxGaWx0ZXIiOiJwcm9qZWN0PSdDdXN0b21lciBTdXBwb3J0JyJ9"
adapterConfig: "e30="
# config with objects ql query {"objectsQlQuery":"objectType = Customer"} | b64: "eyJvYmplY3RzUWxRdWVyeSI6Im9iamVjdFR5cGUgPSBDdXN0b21lciJ9"
adapterConfig: "eyJvYmplY3RzUWxRdWVyeSI6Im9iamVjdFR5cGUgPSBJTlBVVF9SRVFVSVJFRCJ9" # {"objectsQlQuery":"objectType = INPUT_REQUIRED"}
# This must match the list of supportedAuthMechanisms specified on the Adapter.
auth:
- basic:
Expand Down Expand Up @@ -383,6 +384,108 @@ entities:
type: String
indexed: true

Workspace:
# https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-assets/#api-rest-servicedeskapi-assets-workspace-get.
displayName: JiraWorkspace
externalId: Workspace
description: Workspace entity in Jira
syncFrequency: HOURLY
syncMinInterval: 1
apiCallFrequency: SECONDLY
apiCallMinInterval: 1
pageSize: 100
pagesOrderedById: false
attributes:
- name: workspaceId
externalId: workspaceId
type: String
indexed: true
uniqueId: true

# WARNING: In order to sync Objects, you must specify the objectsQlQuery in the adapterConfig.
# otherwise Jira will return 400.
Object:
# https://developer.atlassian.com/cloud/assets/rest/api-group-object/#api-object-aql-post.
displayName: JiraObject
externalId: Object
description: Object entity in Jira
syncFrequency: HOURLY
syncMinInterval: 1
apiCallFrequency: SECONDLY
apiCallMinInterval: 1
pageSize: 100
pagesOrderedById: false
attributes:
- name: globalId
externalId: globalId
type: String
indexed: true
uniqueId: true
- name: workspaceId
externalId: workspaceId
type: String
indexed: true
- name: id
externalId: id
type: String
- name: label
externalId: label
type: String
- name: objectKey
externalId: objectKey
type: String
- name: objectType__workspaceId
externalId: objectType__workspaceId
type: String
- name: objectType__globalId
externalId: objectType__globalId
type: String
- name: objectType__id
externalId: objectType__id
type: String
- name: objectType__name
externalId: objectType__name
type: String
- name: objectType__description
externalId: objectType__description
type: String
- name: objectType__position
externalId: objectType__position
type: Int64
- name: objectType__created
externalId: objectType__created
type: DateTime
- name: objectType__updated
externalId: objectType__updated
type: DateTime
- name: objectType__objectCount
externalId: objectType__objectCount
type: Int64
- name: objectType__objectSchemaId
externalId: objectType__objectSchemaId
type: String
- name: objectType__inherited
externalId: objectType__inherited
type: Bool
- name: objectType__abstractObjectType
externalId: objectType__abstractObjectType
type: Bool
- name: objectType__parentObjectTypeInherited
externalId: objectType__parentObjectTypeInherited
type: Bool
- name: created
externalId: created
type: DateTime
- name: updated
externalId: updated
type: DateTime
- name: timestamp
externalId: timestamp
type: Int64
- name: name
externalId: name
type: String

relationships:
# (User) -[UserMember]-> (GroupMember)
UserMember:
Expand All @@ -403,6 +506,11 @@ relationships:
direction: Forward
- relationship: GroupMember
direction: Forward
# (Object) -[ObjectMember]-> (Workspace)
ObjectMember:
name: ObjectMember
fromAttribute: Object.workspaceId
toAttribute: Workspace.workspaceId
# (Issue) -[AssignedTo]-> (User)
IssueAssignee:
name: AssignedTo
Expand Down

0 comments on commit 54f1c7e

Please sign in to comment.