From 6580517e9d04f1db92075540c1427adc970adef1 Mon Sep 17 00:00:00 2001 From: peignerpausz Date: Wed, 11 Nov 2026 11:17:47 +0100 Subject: [PATCH] Initial commit of pendingcontractsparser.py, associated mail-generators and jira-task-updater --- wh20/pendingcontracts/jiraupdater.py | 33 ++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 wh20/pendingcontracts/jiraupdater.py diff --git a/wh20/pendingcontracts/jiraupdater.py b/wh20/pendingcontracts/jiraupdater.py new file mode 100644 index 0000000..be38685 --- /dev/null +++ b/wh20/pendingcontracts/jiraupdater.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python3 + +import csv +from datetime import datetime + +INPUT_CSV = "activation_overview.csv" + +ticket = input("Ticketnummer: ").strip() +order_no = input("Bestellnummer: ").strip() + +found = False + +with open(INPUT_CSV, newline="", encoding="utf-8") as f: + + reader = csv.DictReader(f) + + for row in reader: + + if row["order_no"] == order_no: + + timestamp = datetime.now().strftime("%Y-%m-%d %H:%M") + + print("\n--- JIRA Status ---\n") + print( + f"{timestamp} {ticket}\n\n" + f"{row['product']} für {row['domain']}" + ) + + found = True + break + +if not found: + print("Bestellung nicht gefunden.")