File tree Expand file tree Collapse file tree 5 files changed +15
-13
lines changed
aiplan.go/internal/aiplan Expand file tree Collapse file tree 5 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -44,9 +44,9 @@ type Issue struct {
4444 // priority character varying(30) COLLATE pg_catalog."default",
4545 Priority * string `json:"priority" extensions:"x-nullable"`
4646
47- StartDate * types.TargetDate `json:"start_date" extensions:"x-nullable"`
47+ StartDate * types.TargetDateTimeZ `json:"start_date" extensions:"x-nullable"`
4848 TargetDate * types.TargetDateTimeZ `json:"target_date" extensions:"x-nullable"`
49- CompletedAt * types.TargetDate `json:"completed_at" extensions:"x-nullable"`
49+ CompletedAt * types.TargetDateTimeZ `json:"completed_at" extensions:"x-nullable"`
5050
5151 SequenceId int `json:"sequence_id" gorm:"default:1;index:,where:deleted_at is not null"`
5252 // created_by_id uuid,
@@ -1633,11 +1633,11 @@ func CreateIssue(db *gorm.DB, issue *Issue) error {
16331633
16341634 // Start timer if state in started group
16351635 if issue .State .Group == "started" {
1636- issue .StartDate = & types.TargetDate {Time : time .Now ()}
1636+ issue .StartDate = & types.TargetDateTimeZ {Time : time .Now ()}
16371637 }
16381638
16391639 if issue .State .Group == "completed" {
1640- issue .CompletedAt = & types.TargetDate {Time : time .Now ()}
1640+ issue .CompletedAt = & types.TargetDateTimeZ {Time : time .Now ()}
16411641 }
16421642
16431643 issue .State = nil
Original file line number Diff line number Diff line change @@ -53,9 +53,9 @@ type Issue struct {
5353
5454 Priority * string `json:"priority" extensions:"x-nullable"`
5555
56- StartDate * types.TargetDate `json:"start_date" extensions:"x-nullable"`
56+ StartDate * types.TargetDateTimeZ `json:"start_date" extensions:"x-nullable"`
5757 TargetDate * types.TargetDateTimeZ `json:"target_date" extensions:"x-nullable"`
58- CompletedAt * types.TargetDate `json:"completed_at" extensions:"x-nullable"`
58+ CompletedAt * types.TargetDateTimeZ `json:"completed_at" extensions:"x-nullable"`
5959
6060 ProjectId string `json:"project"`
6161 WorkspaceId string `json:"workspace"`
Original file line number Diff line number Diff line change @@ -27,9 +27,9 @@ type SearchLightweightResponse struct {
2727 Name string `json:"name"`
2828 Priority * string `json:"priority" extensions:"x-nullable"`
2929
30- StartDate * types.TargetDate `json:"start_date" extensions:"x-nullable" swaggertype:"string"`
30+ StartDate * types.TargetDateTimeZ `json:"start_date" extensions:"x-nullable" swaggertype:"string"`
3131 TargetDate * types.TargetDateTimeZ `json:"target_date" extensions:"x-nullable" swaggertype:"string"`
32- CompletedAt * types.TargetDate `json:"completed_at" extensions:"x-nullable" swaggertype:"string"`
32+ CompletedAt * types.TargetDateTimeZ `json:"completed_at" extensions:"x-nullable" swaggertype:"string"`
3333
3434 CreatedAt time.Time `json:"created_at"`
3535 UpdatedAt time.Time `json:"updated_at"`
Original file line number Diff line number Diff line change @@ -45,10 +45,10 @@ func (s *Services) shortIssueURLRedirect(c echo.Context) error {
4545 }
4646
4747 ref , _ := url .Parse (fmt .Sprintf (
48- "/%s/projects/%s/issues/%s /" ,
48+ "/%s/projects/%s/issues/%d /" ,
4949 slug ,
50- issue .ProjectId ,
51- issue .ID . String () ))
50+ issue .Project . Identifier ,
51+ issue .SequenceId ))
5252 path := cfg .WebURL .ResolveReference (ref )
5353 return c .Redirect (http .StatusTemporaryRedirect , path .String ())
5454}
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ package aiplan
22
33import (
44 "errors"
5+ "net/http"
6+
57 tracker "github.com/aisa-it/aiplan/aiplan.go/internal/aiplan/activity-tracker"
68 "github.com/aisa-it/aiplan/aiplan.go/internal/aiplan/apierrors"
79 "github.com/aisa-it/aiplan/aiplan.go/internal/aiplan/dao"
@@ -13,7 +15,6 @@ import (
1315 "github.com/labstack/echo/v4"
1416 "gorm.io/gorm"
1517 "gorm.io/gorm/clause"
16- "net/http"
1718)
1819
1920type SprintContext struct {
@@ -34,7 +35,8 @@ func (s *Services) SprintMiddleware(next echo.HandlerFunc) echo.HandlerFunc {
3435 Joins ("UpdatedBy" ).
3536 Preload ("Watchers" ).
3637 Preload ("Issues" ).
37- Where ("sprints.workspace_id = ?" , workspace .ID )
38+ Where ("sprints.workspace_id = ?" , workspace .ID ).
39+ Set ("issueProgress" , true )
3840
3941 if val , err := uuid .FromString (sprintId ); err != nil {
4042 query = query .Where ("sprints.sequence_id = ?" , sprintId )
You can’t perform that action at this time.
0 commit comments