add logging.

This commit is contained in:
2020-05-24 16:30:25 +02:00
parent e2c3b53d50
commit a4c019e67b
22 changed files with 883 additions and 30 deletions
+2 -2
View File
@@ -26,8 +26,8 @@ type Issue {
tasks(filter: IssueTaskFilter): [IssueTask!]!
"Issue items."
items(filter: IssueIssueItemFilter): [IssueItem!]!
#"Logs related to this issue."
#logs: [Log!]!
"Logs related to this issue."
logs: [Log!]!
}
input IssueFilter {
+110
View File
@@ -0,0 +1,110 @@
"""
A log is a chunk of logged work, on one or more issues.
"""
type Log {
"The log's ID."
id: String!
"When the log is taking place."
date: Time!
"A description of the log."
description: String!
"The user that logged the work."
user: User!
"The tasks logged."
tasks: [LogTask!]!
"The items changed."
items: [LogItem!]!
}
type LogTask {
"Parent issue of the task."
issue: Issue!
"The issue task logged."
task: IssueTask!
"How many units of work is done, if applicable."
units: Int
"Time spent on the issue."
duration: Duration!
}
"""
Log items are item changes related to a log.
"""
type LogItem {
"Parent issue of the item."
issue: Issue!
"The item that has been acquired."
item: IssueItem!
"The amount of items acquired."
amount: Int!
}
"Filter for the logs query."
input LogFilter {
"Log IDs to select."
logIds: [String!]
"Limit to the user IDs."
userIds: [String!]
"The issue IDs to limit to."
issueIds: [String!]
"The issue task IDs to limit to."
issueTaskIds: [String!]
"The issue item IDs to limit to."
issueItemIds: [String!]
"Earliest date to get logs from (inclusive)."
fromDate: Time
"Latest date to get logs from (inclusive)."
toDate: Time
}
"Input for the createLog mutation."
input LogCreateInput {
"When did it take place."
date: Time!
"Describe the logged work."
description: String!
"Add issue items to the log."
items: [LogItemInput!]
"Add issue tasks to the log."
tasks: [LogTaskInput!]
}
"Input for the editLog mutation."
input LogEditInput {
"The log to update."
logId: String!
"Update the time of the log."
setDate: Time
"Update the description of the log."
setDescription: String
"Add/update one or more items to the log."
updateItems: [LogItemInput!]
"Remove one or more items from the log."
removeItems: [String!]
"Add/update one or more items to the log."
updateTasks: [LogTaskInput!]
"Remove one or more items from the log."
removeTasks: [String!]
}
"Sub-input for the createLog and editLog mutation."
input LogItemInput {
"The issue item to log ID."
issueItemId: String!
"The amount of items acquired."
amount: Int!
}
"Sub-input for the createLog and editLog mutation."
input LogTaskInput {
"The issue item to log ID."
issueTaskId: String!
"The amount of units done, if applicable."
units: Int
"How long did it take?"
duration: Duration!
}
+6
View File
@@ -30,6 +30,12 @@ type Mutation {
editIssueItem(input: IssueItemEditInput!): IssueItem!
# LOG
"Create a log."
createLog(input: LogCreateInput!): Log!
"Edit a log."
editLog(input: LogEditInput!): Log!
# GOAL
# USER
"Log in."
+5
View File
@@ -21,6 +21,11 @@ type Query {
"List projects."
projects(filter: ProjectFilter): [Project!]!
"Find log."
log(id: String!): Log!
"List logs."
logs(filter: LogFilter): [Log!]!
"Check the user session."
session: User
}