Skip to content

Commit fe5afcb

Browse files
authored
Exposing TimeEstimate field in the API (#35475)
Time Estimate field is not included in the issue modification webhooks or issue API endpoints. This PR fixes the field for the API. --------- Signed-off-by: Gnanakeethan Balasubramaniam <[email protected]> Signed-off-by: Gnanakeethan Balasubramaniam <[email protected]>
1 parent 8c8eb4b commit fe5afcb

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

modules/structs/issue.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ type Issue struct {
7676
// swagger:strfmt date-time
7777
Deadline *time.Time `json:"due_date"`
7878

79+
TimeEstimate int64 `json:"time_estimate"`
80+
7981
PullRequest *PullRequestMeta `json:"pull_request"`
8082
Repo *RepositoryMeta `json:"repository"`
8183

services/convert/issue.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ func toIssue(ctx context.Context, doer *user_model.User, issue *issues_model.Iss
5959
Created: issue.CreatedUnix.AsTime(),
6060
Updated: issue.UpdatedUnix.AsTime(),
6161
PinOrder: util.Iif(issue.PinOrder == -1, 0, issue.PinOrder), // -1 means loaded with no pin order
62+
63+
TimeEstimate: issue.TimeEstimate,
6264
}
6365

6466
if issue.Repo != nil {

templates/swagger/v1_json.tmpl

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)