refs #62804 Новые задачи.

This commit is contained in:
2026-07-28 17:37:32 +03:00
parent 7cdd5010a2
commit 65053c3d17
3 changed files with 47 additions and 3 deletions

View File

@@ -1,5 +1,13 @@
from api import api
from datetime import date, timedelta
from constants import (
VETRO_PROJECT_ID,
PROD_SUPPORT_TRACKER_ID,
WORK_STATUS_ID,
NORMAL_PRIORITY_ID,
EXECUTOR_FIELD_ID,
RESPONSIBLE_FIELD_ID
)
def release_current_version() -> None:
@@ -16,3 +24,21 @@ def add_version() -> None:
"description": today.strftime("Релиз от %d.%m.%y"),
"sharing": "descendants"
})
def add_release_issue() -> None:
today = date.today()
user = api.get_current_user()
api.add_issue(
{
"project_id": VETRO_PROJECT_ID,
"tracker_id": PROD_SUPPORT_TRACKER_ID,
"status_id": WORK_STATUS_ID,
"priority_id": NORMAL_PRIORITY_ID,
"subject": today.strftime("Релиз (%d.%m.%Y)"),
"description": "Выложить задачи со статусом Ожидает релиз в production.",
"assigned_to_id": "me",
"custom_fields": [
{"id": EXECUTOR_FIELD_ID, "value": user["id"]}, {"id": RESPONSIBLE_FIELD_ID, "value": "Фадеев Виктор"}
]
}
)