$SVN_CMD = '/usr/bin/svn' unless defined $SVN_CMD;
$INTERACTIVE = 0 if not defined $INTERACTIVE;
unless (defined $ROUND and $ROUND =~ /^[\d\-]+$/) {
print STDERR "usage: $0 --round=<YEAR-MONTH> option is required and must formated as YYYY-MM\n";
exit 1;
}
unless (defined $PAYMENT_NUMBER and $PAYMENT_NUMBER =~ /^[123]$/) {
print STDERR "usage: $0 --paymentNumber=<VALUE> option is required and must be 1, 2 or 3\n";
exit 1;
}
my @ticketSpecs = Outreachy_FindMainTicketsInRound($ROUND);
my $expectedCompletedInternshipField = '(payment-' . $PAYMENT_NUMBER . '-approved|unsuccessful)';
$expectedCompletedInternshipField = 'success' if ($PAYMENT_NUMBER == 3);
foreach my $ticketSpec (@ticketSpecs) {
my $completedInternshipField = GetCustomFieldForTicket($ticketSpec, "completed-internship");
print "$ticketSpec : has completed-internship of $completedInternshipField instead of $expectedCompletedInternshipField\n" unless $completedInternshipField =~ /$expectedCompletedInternshipField/;