From 725bd68273b1ea00be0311883a73b0c659a1b398 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 20 2015 08:16:55 +0000 Subject: When editing a tag in a project, update all the issues having this tag in git --- diff --git a/progit/lib/__init__.py b/progit/lib/__init__.py index c626b44..1cb985e 100644 --- a/progit/lib/__init__.py +++ b/progit/lib/__init__.py @@ -323,7 +323,7 @@ def remove_tags_issue(session, issue, tags, ticketfolder): return msgs -def edit_issue_tags(session, project, old_tag, new_tag): +def edit_issue_tags(session, project, old_tag, new_tag, ticketfolder): ''' Removes the specified tag of a project. ''' if old_tag == new_tag: @@ -359,6 +359,8 @@ def edit_issue_tags(session, project, old_tag, new_tag): ) session.add(issue_tag) msgs.append('Edited tag: %s to %s' % (old_tag, new_tag)) + progit.lib.git.update_git( + issue, repo=issue.project, ticketfolder=ticketfolder) return msgs diff --git a/progit/ui/issues.py b/progit/ui/issues.py index 8438d03..055096b 100644 --- a/progit/ui/issues.py +++ b/progit/ui/issues.py @@ -280,7 +280,10 @@ def edit_tag(repo, tag, username=None): if form.validate_on_submit(): new_tag = form.tag.data - msgs = progit.lib.edit_issue_tags(SESSION, repo, tag, new_tag) + msgs = progit.lib.edit_issue_tags( + SESSION, repo, tag, new_tag, + ticketfolder=APP.config['TICKETS_FOLDER'] + ) try: SESSION.commit()