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

[17.0][WIP][MIG] connector_jira: Migration to 17.0 #108

Draft
wants to merge 113 commits into
base: 17.0
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
876fcf8
Add first brick of the connector_jira addon
guewen Nov 15, 2016
c97bb82
Update ir.model.access.csv
damdam-s Jan 10, 2017
fac216a
Set uninstallable
guewen Apr 19, 2017
503ea4f
C2C-152 Add project.task.jira_issue_url
simahawk Nov 20, 2018
1c9f464
add epic and issuetype to analytic line
Dec 13, 2018
ba7bd85
Test jira_key only if connector_no_export is True (#13)
Tonow-c2c Jan 4, 2019
039b16b
Better handling of users sync
simahawk Nov 27, 2018
8e5e7b1
Replace text_field by options
guewen Jan 30, 2019
2e6cfeb
Add connector_jira_servicedesk
p-tombez Jan 29, 2019
ef8e174
Read access tokens with sudo
guewen Feb 1, 2019
62b789b
Apply suggestions from code review
TDu Apr 8, 2019
096827e
Prevent error when linking users
guewen Apr 8, 2019
d12937b
Apply suggestions from code review
TDu Apr 10, 2019
0087734
Fix oldname field
guewen Apr 10, 2019
d221278
Fix psycopg2.ProgrammingError: syntax error when no updated_worklogs …
grindtildeath Apr 25, 2019
3b983b9
Make migration more robust
guewen Apr 8, 2019
002ee9d
Use fallback project when task or project is inactive
jcoux May 22, 2019
2e8ed01
Add base test class for worklog
simahawk May 8, 2019
3341be8
Allow several bindings on projects
guewen Jun 25, 2019
27e0656
[ADD] icon.png
OCA-git-bot Jul 12, 2019
9aff8e4
[MIG] connector_jira: Migration to 12.0
alexey-pelykh Jul 20, 2019
077d338
[IMP] connector_jira: improved user binding
alexey-pelykh Aug 11, 2019
2fba13d
connector_jira 12.0.1.0.1
OCA-git-bot Aug 20, 2019
7b5efb7
[IMP] connector_jira: do not track sync updates
alexey-pelykh Aug 11, 2019
e7fa993
connector_jira 12.0.1.0.2
OCA-git-bot Aug 20, 2019
9376bb5
[IMP] connector_jira: view JIRA keys on project and task views
alexey-pelykh Aug 11, 2019
c1fa545
connector_jira 12.0.1.1.0
OCA-git-bot Aug 23, 2019
4a76bd3
[IMP] connector_jira: restrict linked tasks alteration
alexey-pelykh Aug 11, 2019
bc414aa
[IMP] connector_jira: search by jira keys
alexey-pelykh Aug 24, 2019
278ddfc
connector_jira 12.0.1.2.0
OCA-git-bot Sep 2, 2019
681ac4f
[IMP] connector_jira: import estimation and status for tasks
alexey-pelykh Aug 23, 2019
474a968
[IMP] connector_jira: restrict linked AAL modification
alexey-pelykh Sep 1, 2019
51cd2c5
[FIX] connector_jira: issues can be moved between projects
alexey-pelykh Nov 7, 2019
088a151
[IMP] connector_jira: worklog/timesheet date timezone
alexey-pelykh Nov 8, 2019
057db01
[FIX] connector_jira: UI layout
alexey-pelykh Nov 21, 2019
71e4eb2
connector_jira 12.0.1.4.0
OCA-git-bot Dec 3, 2019
69cae0a
[IMP] connector_jira: write only updated values, validate by cache fo…
alexey-pelykh Dec 4, 2019
53ad6e7
connector_jira 12.0.1.5.0
OCA-git-bot Dec 5, 2019
39299b5
[IMP] connector_jira: forced import option
alexey-pelykh Nov 20, 2019
cba3121
connector_jira 12.0.1.6.0
OCA-git-bot Dec 5, 2019
fb7ac64
[IMP] connector_jira: consider archived employees
alexey-pelykh Feb 13, 2020
0ec6b9b
connector_jira 12.0.1.6.1
OCA-git-bot Feb 14, 2020
47515cf
[FIX][11.0] Remove enterprise related code
jcoux Feb 26, 2020
4cf43e9
connector_jira 12.0.1.6.2
OCA-git-bot Feb 27, 2020
297c64d
[13.0][MIG] connetor_jira: migration
Apr 25, 2020
f6f8e33
[REM] pot file
May 7, 2020
8757139
[IMP] apply black, isort
May 8, 2020
a12f683
connector_jira: Fix _compute_jira_issue_url dependencies
grindtildeath Aug 5, 2020
9d4fb93
connector_jira: Fix inconsistent 'compute_sudo' for computed fields
grindtildeath Aug 5, 2020
675090a
connector_jira: Fix parameter 'oldname' is not longer supported; use …
grindtildeath Aug 5, 2020
9895eeb
connector_jira: Fix view inheritance of project.link.jira
grindtildeath Aug 5, 2020
7f2e40e
connector_jira: Fix display of button in footer on project create form
grindtildeath Aug 5, 2020
a53dc6e
[FIX] remove use of deprecated method
gurneyalex Aug 24, 2020
abba43b
connector_jira: Add epic link on epic
grindtildeath Jul 31, 2020
ce55cdf
Pre-commit fixes
leemannd Jan 20, 2021
30162b5
prettier
leemannd Jan 20, 2021
81ce5cd
Fix missing assignement in compute function
leemannd Mar 8, 2021
dcbc9d7
connector_jira 13.0.1.0.1
OCA-git-bot Mar 11, 2021
e98bade
[FIX] set company_id on the task related to the project
vrenaville Apr 30, 2021
197d848
connector_jira 13.0.1.1.0
OCA-git-bot Jun 15, 2021
1d198a9
[IMP] connector_jira: black, isort, prettier
Jun 1, 2022
2f0c498
[15.0][MIG] connector_jira: Migrate to version 15.0
Jun 8, 2022
0bca123
[UPD] Update connector_jira.pot
Jul 6, 2022
a1ca62d
[UPD] README.rst
OCA-git-bot Jul 6, 2022
fd19196
[UPD] Brainbean Apps => CorporateHub
alexey-pelykh Jul 15, 2022
4ca08be
connector_jira: fix migration from 14.0
sebalix Jul 18, 2022
4e640e4
[15.0][FIX] fix issue with maxResults in url
Jul 14, 2022
5e1cf97
connector_jira 15.0.1.0.1
OCA-git-bot Jul 20, 2022
cc2be69
[UPD] README.rst
OCA-git-bot Jul 20, 2022
b283291
update_contributors
leemannd Jul 20, 2022
847ef40
[UPD] README.rst
OCA-git-bot Jul 20, 2022
a39d923
[UPD] Update connector_jira.pot
Jul 20, 2022
8318b70
[UPD] Brainbean Apps => CorporateHub
alexey-pelykh Nov 4, 2020
493f516
[UPD] README.rst
OCA-git-bot Jul 20, 2022
657f602
[UPD] README.rst
OCA-git-bot Sep 3, 2023
72d7b7e
Fix precommit flagged issues
gurneyalex Feb 7, 2024
fba4c5c
[FIX]: pin python packages dependency requirements
smussie Jan 10, 2024
f9c6857
fixup! fixup! [FIX]: pin python packages dependency requirements
gurneyalex Feb 16, 2024
ba75c16
[DRAFT] 11.0 Make Jira connector GDPR compliant
May 26, 2021
4b02982
[DRAFT] 11.0 Make Jira connector GDPR compliant
May 26, 2021
5357704
[DRAFT] 11.0 Make Jira connector GDPR compliant
May 27, 2021
e09c689
user mapping work
gurneyalex Feb 16, 2024
c97fcaa
update dependencies
gurneyalex Feb 16, 2024
f80832d
fixup! update dependencies
gurneyalex Feb 16, 2024
deb8d4a
fixup! fixup! update dependencies
gurneyalex Feb 16, 2024
ce63608
fixup! user mapping work
gurneyalex Feb 16, 2024
15b3ab9
install the Jira connector as a Jira Connect app
gurneyalex Mar 9, 2024
f9e849f
Design change: urls per jira backend
gurneyalex Mar 10, 2024
5a6bdd4
remove jira_backend_auth wizard
gurneyalex Mar 10, 2024
2a70796
remove jira_oauth_dance CLI tool
gurneyalex Mar 10, 2024
0a85ea0
fixup! remove jira_backend_auth wizard
gurneyalex Mar 10, 2024
89145a2
fixup! Design change: urls per jira backend
gurneyalex Mar 10, 2024
2128cc1
Implement JWT validation on all endpoints
gurneyalex Mar 11, 2024
f131b1d
fix scheduled actions: handle multiple backends
gurneyalex Mar 11, 2024
c5cdc52
update documentation, fix issues, remove tests
gurneyalex Mar 15, 2024
09db602
update documentation, fix issues, remove tests
gurneyalex Mar 15, 2024
9bfbaec
fixup! update documentation, fix issues, remove tests
gurneyalex Mar 15, 2024
6edd215
fixup! fixup! update documentation, fix issues, remove tests
gurneyalex Mar 15, 2024
cd51671
fixup! fixup! fixup! fixup! update documentation, fix issues, remove …
gurneyalex Mar 15, 2024
de2e92a
add migration script
gurneyalex Mar 15, 2024
da42960
fixup! add migration script
gurneyalex Mar 15, 2024
99c89b9
fixup! fixup! add migration script
gurneyalex Mar 16, 2024
c7fe104
add missing dependency on requests-jwt
gurneyalex Mar 16, 2024
94d8b8e
worklog import
gurneyalex Apr 10, 2024
b36c30e
fixup! add missing dependency on requests-jwt
gurneyalex Apr 10, 2024
8c1dcbd
fix migration script
gurneyalex Apr 10, 2024
84cb7d8
improve app description
gurneyalex Apr 10, 2024
25d2feb
Don't use the webhook payload for worklog
gurneyalex Apr 16, 2024
9de84af
Fix 'Link users' button
gurneyalex Apr 19, 2024
62e4a95
fixup! Implement JWT validation on all endpoints
gurneyalex Apr 26, 2024
26bd036
[IMP] connector_jira: pre-commit auto fixes
SilvioC2C Jun 24, 2024
c23c7ed
[ADD] OCA dependencies
SilvioC2C Jun 25, 2024
699a31f
[WIP][MIG] connector_jira: Migration to 17.0
SilvioC2C Jun 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Don't use the webhook payload for worklog
Partial revert of 13ba6ec

When a user records a tempo worklog, a Tempo Worklog is generated,
which also generates a Jira Worklog. This Jira Worklog is the one we
receive through the webhook. It is linked to the Tempo App user and not
to the Jira user who recorded the worklog, and the description is a
standard description.

-> if we want things to work when Tempo is used, we need to only use the
webhook as a notification, and not as a data source.
  • Loading branch information
gurneyalex authored and SilvioC2C committed Jul 11, 2024
commit 25d2feba515d35ae984c7b828f87c1e5d9de5850
2 changes: 1 addition & 1 deletion connector_jira/controllers/main.py
Original file line number Diff line number Diff line change
@@ -111,7 +111,7 @@ def webhook_worklog(self, backend_id, **kw):
else:
env["jira.account.analytic.line"].with_delay(
description=_("Import a worklog from JIRA")
).import_record(backend, issue_id, worklog_id, payload=payload)
).import_record(backend, issue_id, worklog_id)


class JiraConnectAppController(http.Controller):
6 changes: 2 additions & 4 deletions connector_jira/models/account_analytic_line/common.py
Original file line number Diff line number Diff line change
@@ -105,13 +105,11 @@ def _compute_jira_issue_url(self):
)

@api.model
def import_record(self, backend, issue_id, worklog_id, force=False, payload=None):
def import_record(self, backend, issue_id, worklog_id, force=False):
"""Import a worklog from JIRA"""
with backend.work_on(self._name) as work:
importer = work.component(usage="record.importer")
return importer.run(
worklog_id, issue_id=issue_id, force=force, payload=payload
)
return importer.run(worklog_id, issue_id=issue_id, force=force)

def force_reimport(self):
for binding in self.sudo().mapped("jira_bind_ids"):
9 changes: 1 addition & 8 deletions connector_jira/models/account_analytic_line/importer.py
Original file line number Diff line number Diff line change
@@ -217,7 +217,6 @@ def __init__(self, work_context):
self.task_binding = None
self.project_binding = None
self.fallback_project = None
self.worklog_payload = None

def _get_external_updated_at(self):
assert self.external_record
@@ -307,8 +306,6 @@ def _update_data(self, map_record, **kwargs):
def run(self, external_id, force=False, record=None, **kwargs):
assert "issue_id" in kwargs
self.external_issue_id = kwargs.pop("issue_id")
if "payload" in kwargs:
self.worklog_payload = kwargs.pop("payload")
return super().run(external_id, force=force, record=record, **kwargs)

def _handle_record_missing_on_jira(self):
@@ -330,13 +327,9 @@ def _get_external_data(self):
usage="backend.adapter", model_name="jira.project.task"
)
self.external_issue = issue_adapter.read(self.external_issue_id)
if self.worklog_payload is not None:
return self.worklog_payload
else:
return self.backend_adapter.read(self.external_issue_id, self.external_id)
return self.backend_adapter.read(self.external_issue_id, self.external_id)

def _before_import(self):
# breakpoint()
task_binding = self._recurse_import_task()
if task_binding and task_binding.active:
self.task_binding = task_binding