Skip to content

Commit

Permalink
fix: sets priority for the creation of mirror task
Browse files Browse the repository at this point in the history
  • Loading branch information
gebv committed Feb 9, 2022
1 parent f18220d commit f8d3f7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clickup/api/task.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ type CreateTaskRequest struct {
Tags []string
RefTaskID string
AssignIDs []string
PriorityID *int
}

func (r *CreateTaskRequest) buildRequest() *http.Request {
Expand All @@ -271,6 +272,9 @@ func (r *CreateTaskRequest) buildRequest() *http.Request {
if len(r.AssignIDs) > 0 {
dat["assignees"] = r.AssignIDs
}
if r.PriorityID != nil {
dat["priority"] = *r.PriorityID
}

datBytes, _ := json.Marshal(dat)

Expand Down
1 change: 1 addition & 0 deletions clickup/sync_mirror_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ func (s *mirrorTaskSyncer) addMirrorTask(ctx context.Context, spec *SyncRule_Spe
RefTaskID: task.ID,
Tags: []string{"mirror"},
DescriptionMarkdown: task.MirrorTaskDescription(),
PriorityID: task.PriorityID,
}
if spec.SetStatusName != "" {
mirrorTask.StatusName = spec.SetStatusName
Expand Down

0 comments on commit f8d3f7e

Please sign in to comment.