Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] [JIRA] new method get_issue_status_changelog + docs + example +small improvement get_issue #1357

Merged
merged 29 commits into from
Mar 29, 2024

Conversation

gkowalc
Copy link
Contributor

@gkowalc gkowalc commented Mar 22, 2024

This PR adds:

  • new method for jira get_issue_status_changelog to return history of status changes of the given issue key + related docs and examples
  • In addition to above new method I have added small improvement to JIRA get_issue method to include expand flag for the params - expand parameter missing in JIRA get_issue vs issue methid #1354

gkowalc and others added 27 commits February 3, 2024 21:07
@codecov-commenter
Copy link

codecov-commenter commented Mar 22, 2024

Codecov Report

Attention: Patch coverage is 16.66667% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 34.14%. Comparing base (d4ef596) to head (6a83b0b).

Files Patch % Lines
atlassian/jira.py 16.66% 10 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1357      +/-   ##
==========================================
- Coverage   34.15%   34.14%   -0.02%     
==========================================
  Files          46       46              
  Lines        8437     8444       +7     
  Branches     1188     1190       +2     
==========================================
+ Hits         2882     2883       +1     
- Misses       5440     5446       +6     
  Partials      115      115              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -1109,6 +1104,8 @@ def get_issue(
params["fields"] = fields
if properties is not None:
params["properties"] = properties
if expand:
params["expand"] = expand
if update_history is True:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would also write:

        params["updateHistory"] = str(update_history).lower()

instead of:

        if update_history is True:
            params["updateHistory"] = "true"
        if update_history is False:
            params["updateHistory"] = "false"

@@ -1867,6 +1864,20 @@ def set_issue_status(self, issue_key, status_name, fields=None, update=None):
data["update"] = update
return self.post(url, data=data)

def get_issue_status_changelog(self, issue_id):
# Get the issue details with changelog
issue_id = self.get_issue(issue_id, expand="changelog")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not override issue_id, name it response.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gkowalc could you commit into that PR please

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, I implemented both suggestions.

@gkowalc
Copy link
Contributor Author

gkowalc commented Mar 25, 2024

thx for the revierw @Spacetown, let me refactor the code a bit accordign to your suggestions and send a new PR.

@gonchik gonchik changed the title [JIRA] new method get_issue_status_changelog + docs + example +small improvement get_issue [WIP] [JIRA] new method get_issue_status_changelog + docs + example +small improvement get_issue Mar 27, 2024
@gonchik gonchik merged commit 413524b into atlassian-api:master Mar 29, 2024
10 checks passed
@gonchik
Copy link
Member

gonchik commented Mar 29, 2024

@gkowalc thanks for update

gonchik pushed a commit that referenced this pull request Apr 22, 2024
…example (#1377)

* fixing minor issue in scrap_regex_from_issue method

* new Confluence method scrap_regex_from_page+ docs + examples

* added method get_attachments_ids_from_page to jira.py

* added method download_attachments_from_issue

* refactoring download_all_attachments_from_page method

* finished download_attachments_from_issue

* added two new methods: download_attachments.from_issue  and get_attachments_ids_from_issue

* added fix to the infinitive loop

* adding reursion depth condition

* fixed reursion depth condition

* added update4d jira.py with new method + docs +example

* added update4d jira.py with new method + docs +exampl

* fix flake8 issue

* hotfix get_issue_tree_recursive

* added expand to get_issue method, added new method

* get_issue_status_changelog method

* included param expand in get_issue method decription

* WIP PR changes - #1357

* improving index.rst docs #1365

* added whiteboard methods

* added confluence whiteboard endpoints

---------

Co-authored-by: gkowalc <>
Co-authored-by: Greg <gkowalc>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants