Skip to content

Commit

Permalink
[MIG] connector_jira: Migration to 12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-pelykh committed Aug 8, 2019
1 parent 36cfe55 commit 12e8563
Show file tree
Hide file tree
Showing 68 changed files with 1,093 additions and 425 deletions.
145 changes: 112 additions & 33 deletions connector_jira/README.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,41 @@
==============
JIRA Connector
==============

Dependencies
------------
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fconnector--jira-lightgray.png?logo=github
:target: https://github.com/OCA/connector-jira/tree/12.0/connector_jira
:alt: OCA/connector-jira
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/connector-jira-12-0/connector-jira-12-0-connector_jira
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/233/12.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

This module adds Jira synchronization feature.

You need the following Python packages
**Table of contents**

.. contents::
:local:

Installation
============

You need the following Python packages:

* requests
* jira
Expand All @@ -14,13 +45,21 @@ You need the following Python packages
* PyJWT
* cryptography

Setup
-----

Once the addon is installed, follow these steps:

Job Queue
~~~~~~~~~

In ``odoo.conf``, configure similarly:

.. code-block::
[queue_job]
channels = root:1,root.connector_jira.import:2
Backend
^^^^^^^
~~~~~~~

1. Open the menu Connectors > Jira > Backends
2. Create a new Jira Backend
Expand All @@ -33,7 +72,7 @@ Backend
3. Save and continue with the Authentication

Authentication of Backend
^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~

1. On the created backend, click on the Authenticate button, a popup with keys
will appear, keep these open in a tab
Expand All @@ -57,42 +96,39 @@ Authentication of Backend


Configuration of the Backend
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Setup the webhooks
""""""""""""""""""
**Setup the webhooks**

It is advised to setup the webhooks so the synchronizations are in realtime.

1. On the Jira Backend, set the "Base Odoo URL for Webhooks" to URL of Odoo,
it must be reachable from Jira.
2. Click on "Install Webhooks"

Configure the Epic Link
"""""""""""""""""""""""
**Configure the Epic Link**

If you use Epics, you need to click on "Configure Epic Link", Odoo will search
the name of the custom field used for the Epic Link.

Configuration done
""""""""""""""""""
**Configuration done**

You can now click on the button "Configuration Done".

Synchronizations
^^^^^^^^^^^^^^^^
Usage
=====

The tasks and worklogs are always imported from JIRA to Odoo, there
is no synchronization in the other direction.

Initial synchronizations
""""""""""""""""""""""""
~~~~~~~~~~~~~~~~~~~~~~~~

You can already select the "Imports" tab in the Backend and click on "Link
users" and "Import issue types". The users will be matched either by login or by email.

Create and export a project
"""""""""""""""""""""""""""
~~~~~~~~~~~~~~~~~~~~~~~~~~~

Projects can be created in Odoo and exported to Jira. You can then create a
project, and use the action "Link with JIRA" and use the "Export to JIRA" action.
Expand All @@ -101,7 +137,7 @@ When you choose to export a project to JIRA, if you change the name
or the key of the project, the new values will be pushed to JIRA.

Link a project with JIRA
""""""""""""""""""""""""
~~~~~~~~~~~~~~~~~~~~~~~~

If you already have a project on JIRA or prefer to create it first on JIRA,
you can link an Odoo project. Use the "Link with JIRA" action on the project
Expand All @@ -111,7 +147,7 @@ This action establish the link, then changes of the name or the key on either
side are not pushed.

Issue Types on Projects
"""""""""""""""""""""""
~~~~~~~~~~~~~~~~~~~~~~~

When you link a project, you have to select which issue types are synchronized.
Only tasks of the selected types will be created in Odoo.
Expand All @@ -124,33 +160,27 @@ will attach to the closest task following these rules:
* if no epic, attach to the project without being linked to a task

Change synchronization configuration on a project
"""""""""""""""""""""""""""""""""""""""""""""""""
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you want to change the configuration of a project, such as which
issue types are synchronized, you can open the "Connector" tab in
the project settings and edit the "binding" with the backend.

Synchronize tasks and worklogs
""""""""""""""""""""""""""""""
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If the webhooks are active, as soon as they are created in Jira they should appear in Odoo.
If they are not active, you can open the Jira Backend and run the
synchronizations manually, or activate the Scheduled Actions to run the batch
imports. It is important to select the issue types so don't miss this step (need improvement).


Known Issues
------------
Known issues / Roadmap
======================

* If an odoo user has no linked employee, worklogs will still be imported but
with no employee

with no employee.

Design Notes
------------

Allowing several bindings per project
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
**Allowing several bindings per project**

The design evolved to allow more than one Jira binding per project in Odoo.
This conveniently allows to fetch tasks and worklogs for many projects in Jira,
Expand All @@ -167,3 +197,52 @@ be pushed:
choose to which project we push the task, this is not supported yet (for
instance, add a Boolean "export tasks" on the project binding, or explicitly
select the target binding on the task)

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/connector-jira/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/connector-jira/issues/new?body=module:%20connector_jira%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Camptocamp

Contributors
~~~~~~~~~~~~

* Guewen Baconnier <guewen.baconnier@camptocamp.com>
* Akim Juillerat <akim.juillerat@camptocamp.com>
* Damien Crier
* Patrick Tombez <patrick.tombez@camptocamp.com>
* Thierry Ducrest
* Timon Tschanz <timon.tschanz@camptocamp.com>
* jcoux <julien.coux@camptocamp.com>
* Tonow-c2c
* Simone Orsi <simahawk@gmail.com>
* Alexey Pelykh <alexey.pelykh@brainbeanapps.com>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/connector-jira <https://github.com/OCA/connector-jira/tree/12.0/connector_jira>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions connector_jira/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from . import cli
from . import fields
from . import components
Expand Down
100 changes: 51 additions & 49 deletions connector_jira/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,50 +1,52 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

{'name': 'JIRA Connector',
'version': '11.0.1.3.0',
'author': 'Camptocamp,Odoo Community Association (OCA)',
'license': 'AGPL-3',
'category': 'Connector',
'depends': ['connector',
'project',
'hr_timesheet',
'queue_job',
'web',
'web_widget_url_advanced',
'multi_step_wizard',
],
'external_dependencies': {
'python': [
'requests',
'jira',
'oauthlib',
# these are dependencies but as they don't have the same name of
# package / module, we can't list them here
# 'requests-oauthlib',
# 'requests-toolbelt',
# 'PyJWT',
'cryptography',
],
},
'website': 'https://github.com/camptocamp/connector-jira',
'data': [
'views/jira_menus.xml',
'wizards/jira_backend_auth_views.xml',
'views/project_link_jira_views.xml',
'views/task_link_jira_views.xml',
'views/jira_backend_views.xml',
'views/jira_backend_report_templates.xml',
'views/project_project_views.xml',
'views/project_task_views.xml',
'views/res_users_views.xml',
'views/jira_issue_type_views.xml',
'views/timesheet_account_analytic_line.xml',
'wizards/jira_account_analytic_line_import_views.xml',
'security/ir.model.access.csv',
'data/cron.xml',
],
'demo': [
'demo/jira_backend_demo.xml',
],
'installable': True,
}
{
'name': 'JIRA Connector',
'version': '12.0.1.0.0',
'author': 'Camptocamp,Odoo Community Association (OCA)',
'license': 'AGPL-3',
'category': 'Connector',
'depends': [
'connector',
'project',
'hr_timesheet',
'queue_job',
'web',
'web_widget_url_advanced',
'multi_step_wizard',
],
'external_dependencies': {
'python': [
'requests',
'jira',
'oauthlib',
# these are dependencies but as they don't have the same name of
# package / module, we can't list them here
# 'requests-oauthlib',
# 'requests-toolbelt',
# 'PyJWT',
'cryptography',
],
},
'website': 'https://github.com/OCA/connector-jira',
'data': [
'views/jira_menus.xml',
'wizards/jira_backend_auth_views.xml',
'views/project_link_jira_views.xml',
'views/task_link_jira_views.xml',
'views/jira_backend_views.xml',
'views/jira_backend_report_templates.xml',
'views/project_project_views.xml',
'views/project_task_views.xml',
'views/res_users_views.xml',
'views/jira_issue_type_views.xml',
'views/timesheet_account_analytic_line.xml',
'wizards/jira_account_analytic_line_import_views.xml',
'security/ir.model.access.csv',
'data/cron.xml',
],
'demo': [
'demo/jira_backend_demo.xml',
],
'installable': True,
}
2 changes: 2 additions & 0 deletions connector_jira/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from . import jira_oauth_dance
2 changes: 2 additions & 0 deletions connector_jira/components/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from . import base
from . import backend_adapter
from . import binder
Expand Down
2 changes: 1 addition & 1 deletion connector_jira/components/backend_adapter.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright 2016-2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

import logging

Expand Down
2 changes: 1 addition & 1 deletion connector_jira/components/base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright 2018-2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from odoo.addons.component.core import AbstractComponent

Expand Down
2 changes: 1 addition & 1 deletion connector_jira/components/binder.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright 2016-2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

import logging

Expand Down
2 changes: 1 addition & 1 deletion connector_jira/components/exporter.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright 2016-2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

import logging
from contextlib import contextmanager
Expand Down
2 changes: 1 addition & 1 deletion connector_jira/components/importer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright 2016-2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

"""
Expand Down

0 comments on commit 12e8563

Please sign in to comment.