Versioner sammenlignet

Nøgle

  • Linjen blev tilføjet.
  • Denne linje blev fjernet.
  • Formatering blev ændret.

...

Indholdsfortegnelse

Prerequsites

Linux User

All scripts and the crontab stuff assumes that there is a "jira" user, with access to /opt/jira-cron

Atlassian CLI

The Atlassian CLI must be installed and prepared

Workflow

My IssueType is called "Repeatable Task" and has a very small workflow:

...

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

 

 

Alle Issues er lavet om.