diff --git a/jira_helper.sh b/jira_helper.sh new file mode 100644 index 0000000..d3df585 --- /dev/null +++ b/jira_helper.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +echo "=== Jira Zeitbuchung ===" +echo "1) CheckMK (SF-8555)" +echo "2) Meetings/Training/Orga (SF-8753)" +echo "3) Innovation/Ideen (SF-8755)" +echo "4) Management (SF-8757) - Kommentar Pflicht!" +echo "5) Anderes Ticket" +echo "" +read -p "Auswahl [1-5]: " choice + +# Zeitangabe erfragen +read -p "Arbeitszeit (z.B. 30m, 1h, 2h): " worktime + +case $choice in + 1) + read -p "Kommentar: " comment + python3 ~/jira-script/jira_log_work.py -t SF-8555 -w "$worktime" -c "$comment" + ;; + 2) + read -p "Kommentar: " comment + python3 ~/jira-script/jira_log_work.py -t SF-8753 -w "$worktime" -c "$comment" + ;; + 3) + read -p "Mit Kommentar? (j/n): " hascomment + if [[ $hascomment == "j" ]]; then + read -p "Kommentar: " comment + python3 ~/jira-script/jira_log_work.py -t SF-8755 -w "$worktime" -c "$comment" + else + python3 ~/jira-script/jira_log_work.py -t SF-8755 -w "$worktime" + fi + ;; + 4) + read -p "Kommentar (PFLICHT): " comment + python3 ~/jira-script/jira_log_work.py -t SF-8757 -w "$worktime" -c "$comment" + ;; + 5) + read -p "Ticket-Nummer (z.B. SF-1234): " ticket + read -p "Mit Kommentar? (j/n): " hascomment + if [[ $hascomment == "j" ]]; then + read -p "Kommentar: " comment + python3 ~/jira-script/jira_log_work.py -t "$ticket" -w "$worktime" -c "$comment" + else + python3 ~/jira-script/jira_log_work.py -t "$ticket" -w "$worktime" + fi + ;; + *) + echo "Ungültige Auswahl" + ;; +esac \ No newline at end of file