diff --git a/CHANGES.md b/CHANGES.md index 96a7461e..5529690f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,10 @@ # Jira one change log +**Release 0.8.3** - 2024-04-01 +* Fixing the CSV change file type and merge_files to run without JQL +* Added a new endpoint to `runbackup` + + **Release 0.8.2** - 2024-01-02 * Minor fix to `process_executor` function with invalid arguments diff --git a/SECURITY.md b/SECURITY.md index 7c7fbe25..574b65fa 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -6,13 +6,14 @@ Below shows the list of supported versions for the jiraone library | Version | Supported | |---------|--------------------| +| 0.8.3 | :white_check_mark: | | 0.8.2 | :white_check_mark: | | 0.8.1 | :white_check_mark: | | 0.7.9 | :white_check_mark: | | 0.7.8 | :white_check_mark: | | 0.7.7 | :white_check_mark: | | 0.7.6 | :white_check_mark: | -| 0.7.5 | :white_check_mark: | +| 0.7.5 | :x: | | 0.7.4 | :x: | | 0.7.3 | :x: | | 0.7.2 | :x: | diff --git a/pyproject.toml b/pyproject.toml index 3941ea97..f7dcc67b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "jiraone" -version = "v0.8.2" +version = "v0.8.3" authors = [ { name="Prince Nyeche", email="support@elfapp.website" }, ] diff --git a/src/jiraone/__init__.py b/src/jiraone/__init__.py index 91c77e46..d305eac8 100644 --- a/src/jiraone/__init__.py +++ b/src/jiraone/__init__.py @@ -37,7 +37,7 @@ from jiraone.management import manage __author__ = "Prince Nyeche" -__version__ = "0.8.2" +__version__ = "0.8.3" __all__ = [ "LOGIN", "endpoint", diff --git a/src/jiraone/access.py b/src/jiraone/access.py index 95dbe489..1d14c198 100644 --- a/src/jiraone/access.py +++ b/src/jiraone/access.py @@ -3906,6 +3906,18 @@ def project_validate(cls, key_or_name: str, check: str = None) -> str: ". See jiraone docs for more info.", ) + @classmethod + def runbackup(cls): + """Runs a backup process for the environment + + Example 1:: + # send a POST request with the payload + payload_data = {"cbAttachments": "false", "exportToCloud": "true"} + # changing "cbAttachments" to "true" will enable backup with attachments + + """ + return "{}/rest/backup/1/export/runbackup".format(LOGIN.base_url) + class For: """A Class to show the implementation of a 'for' loop. diff --git a/src/jiraone/reporting.py b/src/jiraone/reporting.py index 96cc00b4..5428db5f 100644 --- a/src/jiraone/reporting.py +++ b/src/jiraone/reporting.py @@ -3270,6 +3270,22 @@ def export_issues( # stores most configuration data using a dictionary config = {} + if merge_files: + jql = "" + if csv_to_json: + jql = "" + extension = "json" + if check_auth is False: + sys.stderr.write("Warning: A valid session to query Jira data" + " is required when using the `csv_to_json` " + "argument.") + + if merge_files and csv_to_json: + raise JiraOneErrors("errors", + "You cannot use both " + "`merge_files` and `csv_to_json` at the same" + " time as both are mutually exclusive.") + # Checking that the arguments are passing correct data structure. def field_value_check( param_field: list = None, @@ -3431,6 +3447,7 @@ def map_field( "single string character.", ) elif delimit == "": + delimit = "," print( "Defaulting to comma as CSV separator." ) if extension.lower() == "csv" else None @@ -3860,6 +3877,7 @@ def check_field_membership( 0, 0, ) + if csv_to_json != "": merge_files.append(csv_to_json) @@ -5266,7 +5284,8 @@ def csv_field_change( if operation == "exclude" or operation == "include" else "Changing CSV file delimiter" ) - fetch_field_ids(config["headers"]) + if operation == "exclude" or operation == "include": + fetch_field_ids(config["headers"]) ( _field_list, first_run, @@ -5305,7 +5324,7 @@ def csv_field_change( _field_data.append(field_row) if first_run is False: file_headers.append( - field_header.get("field_column_name") + field_header.get("column_name") ) first_run = True @@ -5324,8 +5343,6 @@ def csv_field_change( mark="many", mode="w+", delimiter=delimit - if operation == "exclude" or operation == "include" - else ",", ) ) print( @@ -5344,8 +5361,6 @@ def csv_field_change( data=_field_list, mark="many", delimiter=delimit - if operation == "exclude" or operation == "include" - else ",", ) ) @@ -7326,6 +7341,13 @@ def issue_count( return DotNotation(value) + @staticmethod + def view_issues(*, + project_key_or_id: Union[str, int] = None, + key_or_id: Union[str, int] = None) -> None: + """View all issues and its properties""" + + class Users: """ This class helps to Generate the No of Users on Jira Cloud