Skip to content

Commit

Permalink
Merge pull request #74 from princenyeche/princenyeche-patch-1
Browse files Browse the repository at this point in the history
Patch v4 to `time_in_status()` noticed current status not updated on result
  • Loading branch information
princenyeche authored Jan 30, 2022
2 parents 1e6effb + f4ff63d commit d3d020a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
15 changes: 10 additions & 5 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
# Jira one change log

**Release 0.5.5** - 2022-01-30
### Patch update #72
* Patch v4 to `time_in_status()`. Noticed the current status not updated on result file.


**Release 0.5.4** - 2022-01-29
### Macro update #69
### Micro update #69
* Fixed a regression in `time_in_status()`
* Patch v3


**Release 0.5.3** - 2022-01-29
### Macro update #69
### Micro update #69
* Fixed a regression in `time_in_status()` which caused the data not to
be written to the file.

**Release 0.5.2** - 2022-01-29
### Macro update #67
### Micro update #67
* Removed encoding argument for `file_writer`

**Release 0.5.1** - 2022-01-29
### Macro update #66
### Micro update #66
* Added a save point to `PROJECT.change_log()` method
* Added type hint to the entire `jiraone` module, classes and functions.


**Release 0.5.0** - 2022-01-04
### Macro update #65
### Micro update #65
* Corrected URL for codacy on `README.md` file.


Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include README.md LICENSE
include README.md LICENSE CHANGES.md .readthedocs.yaml
2 changes: 1 addition & 1 deletion jiraone/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from jiraone.management import manage

__author__ = "Prince Nyeche"
__version__ = "0.5.4"
__version__ = "0.5.5"
__all__ = ["LOGIN",
"endpoint",
"echo",
Expand Down
7 changes: 4 additions & 3 deletions jiraone/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,18 +184,19 @@ def time_in_status(
"to_string": 0,
"summary": 0
}):
def initialize(t, f) -> None:
def initialize(t, f, d: bool = False) -> None:
"""Rerun the data for time extraction.
:param t: A timedelta object showing the present or future datetime
:param f: A timedelta object showing the previous datetime
:param d: A decision maker option
:return: none
"""
difference = t - f
data_bundle = {
"time_status": pretty_format(difference, pprint),
"issue_key": items['issue_key'],
"from_string": items['from_string'],
"to_string": items['to_string'],
"to_string" if d is False else "status_name": items['to_string'],
"summary": items['summary'],
"author": items['author']
}
Expand All @@ -222,7 +223,7 @@ def initialize(t, f) -> None:
from_time = dt.strptime(items['created'], "%Y-%m-%dT%H:%M:%S.%f%z")
present = dt.strftime(dt.astimezone(dt.now()), "%Y-%m-%dT%H:%M:%S.%f%z")
today = dt.strptime(present, "%Y-%m-%dT%H:%M:%S.%f%z")
initialize(today, from_time)
initialize(today, from_time, d=True)
if rows >= number_of_history_items:
break

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="jiraone",
version="0.5.4",
version="0.5.5",
author="Prince Nyeche",
author_email="[email protected]",
description="A REST API Implementation to Jira Cloud APIs for creating reports and "
Expand Down

0 comments on commit d3d020a

Please sign in to comment.