Sidehistorik
...
Kodeblok |
---|
#!/bin/bash # CLI Reference: https://bobswift.atlassian.net/wiki/display/JCLI/JIRA+Command+Line+Interface IFS=$(echo -en "\n\b") CHAR="'" OKSTATUS="Frozen (10003)" issueKey=$1 if [ $issueKey != '' ] then StatusFieldValue=`/opt/atlassian-cli/jira.sh --action GetFieldValue --issue "$issueKey" --field "Status" --file /tmp/value` if [ -f /tmp/value ] then Status=`cat /tmp/value | sed 's/'"$CHAR"'//g'` if [ $Status == $OKSTATUS ] then # Transition issue /opt/atlassian-cli/jira.sh --action progressIssue --issue "$issueKey" --step "Initiate" >> /opt/jira-cron/jiraTransitionIssue.log 2>&1 else echo "Issue $issueKey was not in $OKSTATUS State, but in $Status" fi fi else echo "No IssueKey as parameter" fi |
The Master Cron
To make the JIRA users crontab on a regular basis, I use /etc/crontab on Ubuntu:
Kodeblok |
---|
0 20 * * * root /opt/jira-cron/jiraMakeCrontab.sh |