From 343c131069c76fe68900d95b2a3e996e25e5c9c7 Mon Sep 17 00:00:00 2001 From: Michal Galet Date: Mon, 12 Dec 2016 10:18:24 +0100 Subject: [PATCH 1/2] Fix JIRA service editing for GitLab 8.14+ GitLab simplified the configuration for JIRA service and renamed most of the fields. To maintain backward compatibility all mandatory fields were moved to optional section. --- gitlab/objects.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gitlab/objects.py b/gitlab/objects.py index 2560ba4d0..eaae9c6b4 100644 --- a/gitlab/objects.py +++ b/gitlab/objects.py @@ -1992,8 +1992,16 @@ class ProjectService(GitlabObject): 'server')), 'irker': (('recipients', ), ('default_irc_uri', 'server_port', 'server_host', 'colorize_messages')), - 'jira': (('new_issue_url', 'project_url', 'issues_url'), - ('api_url', 'description', 'username', 'password')), + 'jira': (tuple(), ( + # Required fields in GitLab >= 8.14 + 'url', 'project_key', + + # Required fields in GitLab < 8.14 + 'new_issue_url', 'project_url', 'issues_url', 'api_url', + 'description', + + # Optional fields + 'username', 'password')), 'pivotaltracker': (('token', ), tuple()), 'pushover': (('api_key', 'user_key', 'priority'), ('device', 'sound')), 'redmine': (('new_issue_url', 'project_url', 'issues_url'), From f7e6482f6f8e5a5893f22739ec98005846c74eec Mon Sep 17 00:00:00 2001 From: Michal Galet Date: Mon, 12 Dec 2016 10:24:54 +0100 Subject: [PATCH 2/2] Add jira_issue_transition_id to the JIRA service optional fields --- gitlab/objects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitlab/objects.py b/gitlab/objects.py index eaae9c6b4..4d1e7b802 100644 --- a/gitlab/objects.py +++ b/gitlab/objects.py @@ -2001,7 +2001,7 @@ class ProjectService(GitlabObject): 'description', # Optional fields - 'username', 'password')), + 'username', 'password', 'jira_issue_transition_id')), 'pivotaltracker': (('token', ), tuple()), 'pushover': (('api_key', 'user_key', 'priority'), ('device', 'sound')), 'redmine': (('new_issue_url', 'project_url', 'issues_url'),