refs #62804 Новые задачи.
This commit is contained in:
26
tasks.py
26
tasks.py
@@ -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": "Фадеев Виктор"}
|
||||
]
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user