Skip to content

Commit

Permalink
backport-create-issue: copy 'Assignee' of original issue to backports
Browse files Browse the repository at this point in the history
Signed-off-by: Casey Bodley <cbodley@redhat.com>
  • Loading branch information
cbodley committed May 27, 2022
1 parent 805d232 commit d445e02
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/script/backport-create-issue
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import os
import re
import time
from redminelib import Redmine # https://pypi.org/project/python-redmine/
from redminelib.exceptions import ResourceAttrError

redmine_endpoint = "https://tracker.ceph.com"
project_name = "Ceph"
Expand Down Expand Up @@ -216,13 +217,19 @@ def update_relations(r, issue, dry_run):
"unknown release " + release)
break
subject = (release + ": " + issue['subject'])[:255]
assigned_to_id = None
try:
assigned_to_id = issue.assigned_to.id
except ResourceAttrError: # not assigned
pass
if dry_run:
logging.info(url(issue) + " add backport to " + release)
continue
other = r.issue.create(project_id=issue['project']['id'],
tracker_id=backport_tracker_id,
subject=subject,
priority_id=issue['priority']['id'],
assigned_to_id=assigned_to_id,
target_version=None,
custom_fields=[{
"id": release_id,
Expand Down

0 comments on commit d445e02

Please sign in to comment.