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

Added Jira ServiceDesk support #371

Closed
wants to merge 52 commits into from

Conversation

igor-pavlenko
Copy link

@igor-pavlenko igor-pavlenko commented Mar 23, 2017

Added following API methods support (it doesn't break previously added methods):

  • create_customer() Creates a customer that is not associated with a service desk project.
  • service_desk_info() Returns runtime information about JIRA Service Desk.
  • create_organization() Creates an organization
  • delete_organization() Delete organization
  • organization() Get an organization for a given organization ID
  • organizations() Returns a list of organizations in the JIRA instance.
  • add_users_to_organization() Add users to organization
  • remove_users_from_organization() Remove users from organization
  • get_users_from_organization() Returns a list of users in organization.
  • service_desks() Get a list of ServiceDesk Resources from the server
  • service_desk() Returns the service desk for a given service desk Id.
  • create_request() Create a new customer request and return an issue Resource for it.
  • request() Get an issue Resource from the server.
  • my_customer_requests() Returns all customer requests for the user that is executing the query.
  • request_comments() Returns all comments on a customer request, for a given request Id/key.
  • servicedesk_attachment() Add attachment (from RequestTemporaryAttachment) to request
  • attach_temporary_file() Create temporary attachment file
  • request_types() Returns all request types from a service desk, for a given service desk Id.
  • request_type() Returns a request type for a given request type Id.
  • request_type_by_name() Return request type id by it name

All method covered with tests.

tarasmatsyk and others added 30 commits December 27, 2016 15:19
…edesk_info, create organization, delete_organization + tests.
…desk

Add support for some Service Desk API calls
@codecov-io
Copy link

Codecov Report

Merging #371 into develop will increase coverage by 2.14%.
The diff coverage is 73.94%.

@@             Coverage Diff             @@
##           develop     #371      +/-   ##
===========================================
+ Coverage    47.94%   50.09%   +2.14%     
===========================================
  Files           10       10              
  Lines         2484     2651     +167     
  Branches       461      492      +31     
===========================================
+ Hits          1191     1328     +137     
- Misses        1150     1153       +3     
- Partials       143      170      +27
Impacted Files Coverage Δ
jira/client.py 52.57% <70.05%> (+2.11%) ⬆️
jira/resources.py 66.32% <92.68%> (+2.76%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7934cde...3d56ffb. Read the comment docs.

Copy link
Member

@ssbarnea ssbarnea left a comment

Choose a reason for hiding this comment

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

This is adding a lot of code to a class that is already really big and i am wondering if it would not worth to add a Desk class which exposes its instance automatically as "desk" attribute on Jira() objects. So people will be able to do j.desk.create_case() instead of "j.create_case".

This will keep the namespace clear and also allow you to put all the code related to desk in a separate file.

Please do not start to implement these changes until we don't get some feedback from someone else. Maybe they have better ideas.

@asqui
Copy link
Contributor

asqui commented Mar 30, 2017

Definitely agree with @ssbarnea that it would be a good idea to segregate this code off to prevent the JIRA class growing too monolithic. This seems like a separate area of functionality and a nice boundary on which to segregate.

@ssbarnea
Copy link
Member

ssbarnea commented Jul 2, 2018

Closing this work needs to be rebased on master. Please feel free to create new PR, preferably splitting the work in multiple ones. It would be much easier to get small reviews in than bigger ones.

@ssbarnea ssbarnea closed this Jul 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants