34 lines
706 B
Python
34 lines
706 B
Python
#!/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.")
|