Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Implement the logger functionality #17

Open
billp opened this issue Jun 23, 2020 · 0 comments
Open

Implement the logger functionality #17

billp opened this issue Jun 23, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@billp
Copy link
Owner

billp commented Jun 23, 2020

Description

A user will be able to log hours by providing ticket ids and optionally durations by using a specific syntax.
He can also specify a date for hours to be logged in different date than the current one (today).

Command

bin/jira-logwork log [ISSUES_WITH_DURATIONS] --date [DATE]

Arguments

ISSUES_WITH_DURATIONS log argument (Required): It's a string which contains comma-separated issues with optional durations and start times. To clarify things a little bit, lets say a user enters the following command:
jira-logwork log ABC-123=10:00|1h30m,ERS-52=1h,ESS-312,EF-4123 --date 23/06/2020

The parser will execute the following steps:

  1. Splits the ISSUES_WITH_DURATIONS string to separate issues and get their options (if any). It uses comma separator(,) for issues and pipe separator(|) for options. In our case it will create the following table:
jira_id start_time duration adjustment_mode converted_duration
ABC-123 10:00 1h30m fixed
ERS-52 1h fixed
ESS-312 auto
EF-4123 auto
  1. Fills the missing values by making conversions. The final table will be the following:
jira_id start_time duration adjustment_mode converted_duration
ABC-123 10:00 1h30m fixed 5400
ERS-52 11:30 1h fixed 3600
ESS-312 12:30 2h45m auto 9900
EF-4123 15:15 2h45m auto 9900
TOTAL - 8h - 28800

It takes into account the configuration params given in configuration step. In this example, they are the following: shift_start: 10:00, shift_end: 18:00

@billp billp added the enhancement New feature or request label Jun 23, 2020
@billp billp self-assigned this Jun 23, 2020
@billp billp changed the title Implement log functionality via command line Implement the logger functionality Feb 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant