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

[15.0] [MIG] connector_jira_servicedesk: Migrate to version 15.0 #77

Merged
merged 19 commits into from
Jul 20, 2022

Commits on Jul 19, 2022

  1. Add connector_jira_servicedesk

    Map projects by external_id + set of jira orgs
    
    Project bindings now can be assigned to one or more jira organizations.
    The binding for the project accept an additional argument for
    organizations. A task will be linked with the project having the exact
    same set of organizations that it has, or fallback to a project without
    organization.
    
    A constraint ensures that you cannot have several projects with the same
    set of organizations or 2 projects without organization.
    
    The link wizard has a new step to select the organization.
    
    The REST API for Serviced Desk is a different one.
    
    The former code was based on pycontribs/jira#388
    which is closed and unmaintained. We only need to read the organizations
    from the servicedesk REST API and the local code is minimal.
    
    We can now use the normal jira library.
    p-tombez authored and sonhd91 committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    2edaeca View commit details
    Browse the repository at this point in the history
  2. Update documentation

    guewen authored and sonhd91 committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    3fe4b9e View commit details
    Browse the repository at this point in the history
  3. Fix project binding unique constraint

    We should be able to have 2 bindings without external_id (not yet
    exported)
    guewen authored and sonhd91 committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    3cc80d1 View commit details
    Browse the repository at this point in the history
  4. Add is_master on jira project bindings

    guewen authored and sonhd91 committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    923a2a3 View commit details
    Browse the repository at this point in the history
  5. Allow to have one project binding per project type

    The unicity constraint (backend_id, odoo_id) on jira.backend.backend is
    relaxed: it now allows one binding of each type.
    The reason for this is:
    
    * supporting several projects of different types is a requirements (eg.
      1 service desk and 1 software)
    * but if we implement new features like "if I create a task it is
      pushed to Jira", with different projects we would not know where to
      push them
    
    Using this constraint, we'll be able to focus new export features by
    project type.
    guewen authored and sonhd91 committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    b45f53c View commit details
    Browse the repository at this point in the history
  6. Prevent duplicates with inactive projects

    The constraint did not look for inactive projects, which
    makes the import fail later because it finds several projects
    for the same task.
    guewen authored and sonhd91 committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    e44b9ba View commit details
    Browse the repository at this point in the history
  7. Handle 404 errors when importing records

    When a record does not exist on Jira:
    
    * the job is done instead of failed
    * a result on the job tells about the missing record
    * the binding is deleted on Odoo
    * for worklogs, the analytic line is deleted as well
    guewen authored and sonhd91 committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    7393fb5 View commit details
    Browse the repository at this point in the history
  8. Make pylint-odoo happy

    guewen authored and sonhd91 committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    f95515f View commit details
    Browse the repository at this point in the history
  9. Store jira's 'updated_at' field to compare with binding

    We can compare the millisecond dates on both sides to see if any changes
    has been done on Jira and avoid useless writes.  Previously, we were
    using the 'sync_date' field, which works too but will make more sync
    than necessary (because the sync happens after the last jira's
    updated_at value).
    
    Fortuitously, the updated_at is also very useful for debugging purposes.
    guewen authored and sonhd91 committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    1ed4007 View commit details
    Browse the repository at this point in the history
  10. Fix fetch pagination of organizations

    The pagination specs of the servicedesk API are not the same than the
    Jira API (respectively isLastPage vs lastPage). So the lib's
    _fetch_pages does not fetch all the pages.
    
    Optimize the requests: we get all the data at the initial call, so
    the records are passed directly to "import_record" which will not do
    another request.
    guewen authored and sonhd91 committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    c609411 View commit details
    Browse the repository at this point in the history
  11. [ADD] icon.png

    OCA-git-bot authored and sonhd91 committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    3d950e1 View commit details
    Browse the repository at this point in the history
  12. [11.0][FIX] JIRA not required

    Jaime Arroyo authored and sonhd91 committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    6d98af9 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    01bdba0 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    cee6dfb View commit details
    Browse the repository at this point in the history
  15. [IMP]connector_jira_servicedesk: Add servicedesk_issue_url

    Update connector_jira_servicedesk/models/account_analytic_line/common.py
    
    Co-authored-by: Stéphane Mangin <StephaneMangin@users.noreply.github.com>
    
    Update connector_jira_servicedesk/tests/test_import_organization.py
    
    Co-authored-by: Stéphane Mangin <StephaneMangin@users.noreply.github.com>
    
    Update connector_jira_servicedesk/tests/common.py
    
    Co-authored-by: Stéphane Mangin <StephaneMangin@users.noreply.github.com>
    
    Update connector_jira_servicedesk/i18n/connector_jira_servicedesk.pot
    
    Co-authored-by: Stéphane Mangin <StephaneMangin@users.noreply.github.com>
    
    Update connector_jira_servicedesk/models/account_analytic_line/importer.py
    
    Co-authored-by: Stéphane Mangin <StephaneMangin@users.noreply.github.com>
    2 people authored and sonhd91 committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    9a22e02 View commit details
    Browse the repository at this point in the history
  16. [UPD] README.rst

    OCA-git-bot authored and sonhd91 committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    7152947 View commit details
    Browse the repository at this point in the history
  17. connector_jira_servicedesk 13.0.1.1.0

    OCA-git-bot authored and sonhd91 committed Jul 19, 2022
    Configuration menu
    Copy the full SHA
    20b1f0e View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    2bd3fd9 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    4e37a8e View commit details
    Browse the repository at this point in the history