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

[Jira] Fix the parameter of remove_user_from_group from username to account id #1018

Merged
merged 12 commits into from
Aug 11, 2022

Conversation

YugoHino
Copy link
Contributor

@YugoHino YugoHino commented Aug 2, 2022

According to the API document, username is no longer available for remove_user_from_group. When this api is called, there is an error "HTTPError: Specified user does not exist or you do not have required permissions".
This PR is fixed the parmeter as following,

username -> accountId

Please let me know if I need to fix something.

@gonchik
Copy link
Member

gonchik commented Aug 3, 2022

@YugoHino Can we support for the DC release as well ? :)
it means on prem used the username parameter instead of account_id

@YugoHino
Copy link
Contributor Author

YugoHino commented Aug 3, 2022

@gonchik Thank you for the comment. Your comment is correct, I only cared about Cloud version but I should care about DC as well. I will change the approach that currently replace username to account_id but username should be there and account_id should be added as optional. I will fix it.

@YugoHino
Copy link
Contributor Author

YugoHino commented Aug 4, 2022

Hi,

I fixed it. Those params are selected if the url domain is Cloud or not. When the url domain has atlassian.net, accountId is used for params. And else, username is used for it as well as so far.

@YugoHino YugoHino changed the title Fix the parameter of remove_user_from_group from username to account id [Jira] Fix the parameter of remove_user_from_group from username to account id Aug 5, 2022
@YugoHino
Copy link
Contributor Author

YugoHino commented Aug 9, 2022

Hi @gonchik Sorry for bothring you. Regarding this PR, please let me know if I should do for it. Or, I wait for the review.

@gonchik
Copy link
Member

gonchik commented Aug 11, 2022

Hi @YugoHino ,
let me formalize the existing code and after I will merge it

@codecov-commenter
Copy link

Codecov Report

Merging #1018 (8f8466d) into master (bb360be) will decrease coverage by 0.01%.
The diff coverage is 20.00%.

@@            Coverage Diff             @@
##           master    #1018      +/-   ##
==========================================
- Coverage   36.00%   35.98%   -0.02%     
==========================================
  Files          35       35              
  Lines        6777     6780       +3     
  Branches     1056     1057       +1     
==========================================
  Hits         2440     2440              
- Misses       4231     4234       +3     
  Partials      106      106              
Impacted Files Coverage Δ
atlassian/jira.py 19.12% <20.00%> (-0.04%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@gonchik gonchik merged commit c0b7627 into atlassian-api:master Aug 11, 2022
@YugoHino YugoHino deleted the fix-jira-remove_user_from_group branch August 11, 2022 12:58
gonchik pushed a commit that referenced this pull request Sep 3, 2022
…ccount id (#1018)

* Fix the parameter from username to account id

* fix remove_user_from_group for both DC and Cloud

* fix optional parameter syntax

* add docs

* fix optional parameter syntax

add docs

* fix format by black
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.

3 participants