# -*- coding: utf-8 -*-
# Copyright (c) 2021, JINGROW
# For license information, please see license.txt


import jingrow


def execute():
	jingrow.reload_pg("jcloud", "pagetype", "release_group")
	jingrow.reload_pg("jcloud", "pagetype", "release_group_app")
	jingrow.reload_pg("jcloud", "pagetype", "release_group_server")

	groups = jingrow.get_all("Release Group")
	for group in groups:
		old_group_name = group.name
		group = jingrow.get_pg("Release Group", group.name)
		group.set_new_name(force=True)
		jingrow.rename_pg("Release Group", old_group_name, group.name, force=True)
