Project

General

Profile

fix-ticket-resolutions.sh

Andreas Kohlbecker, 09/15/2016 10:44 AM

Download (460 Bytes)

 
1
#!/bin/bash
2

    
3
MYSQL_HOST=127.0.0.1
4
MYSQL_PORT=33306
5
MYSQL_USR='xxx'
6
MYSQL_PWD='xxxx'
7
MYSQL_DB='trac'
8

    
9
MYSQL="mysql -h $MYSQL_HOST -P$MYSQL_PORT -u$MYSQL_USR -p$MYSQL_PWD $MYSQL_DB"
10

    
11
# -------
12

    
13
echo "select id from ticket t where t.resolution = 'wontfix'" | $MYSQL > tickets-wontfix
14
echo "select id from ticket t where t.resolution = 'invalid'" | $MYSQL > tickets-invalid
15

    
16
awk -f fix-ticket-status.awk tickets-wontfix
17
awk -f fix-ticket-status.awk tickets-invalid
Add picture from clipboard (Maximum size: 40 MB)