Skip to content

Commit

Permalink
ok, I can distinct those cases easily - but maybe it's not clear
Browse files Browse the repository at this point in the history
  • Loading branch information
jzyinq committed Mar 29, 2024
1 parent 877c4bd commit f1b5adc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gojira/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ var IssuesCommand = &cli.Command{
return err
}
err = spinner.New().Title("Logging work...").Action(func() {
err = issue.LogWork(app.time, timeSpent)
if initialTimeSpent != "" {
err = worklog.Update(timeSpent)
} else {
err = issue.LogWork(app.time, timeSpent)
}
}).Run()
if err != nil {
return err
Expand Down Expand Up @@ -275,6 +279,7 @@ func (issue Issue) LogWork(logTime *time.Time, timeSpent string) error {
return err
}
if Config.UpdateExistingWorklog {
// FIXME should I append worklog or replace it?
for index, workLog := range todayWorklog {
if workLog.Issue.Key == issue.Key {
timeSpentSum := FormatTimeSpent(TimeSpentToSeconds(timeSpent) + workLog.TimeSpentSeconds)
Expand Down

0 comments on commit f1b5adc

Please sign in to comment.