@@ -115,6 +115,7 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command {
|
||||
if err := cmdutil.ValidateEnum("order-by", flagOrderBy, []string{"PRIORITY_RANK", "CREATED_AT"}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
variables["orderBy"] = map[string]any{
|
||||
"field": flagOrderBy,
|
||||
"direction": flagOrderDir,
|
||||
@@ -136,12 +137,15 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command {
|
||||
if err := json.Unmarshal(data, &resp); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if resp.Node == nil {
|
||||
return nil, fmt.Errorf("organization %s not found", flagOrg)
|
||||
}
|
||||
|
||||
if resp.Node.Typename != "Organization" {
|
||||
return nil, fmt.Errorf("expected Organization node, got %s", resp.Node.Typename)
|
||||
}
|
||||
|
||||
return &resp.Node.Tasks, nil
|
||||
},
|
||||
)
|
||||
@@ -164,6 +168,7 @@ func NewCmdList(f *cmdutil.Factory) *cobra.Command {
|
||||
if t.Deadline != nil {
|
||||
deadline = *t.Deadline
|
||||
}
|
||||
|
||||
rows = append(rows, []string{
|
||||
t.ID,
|
||||
t.Name,
|
||||
|
||||
Reference in New Issue
Block a user