Created
December 2, 2013 21:59
-
-
Save doctorallen/7759846 to your computer and use it in GitHub Desktop.
Updating Trac with custom fields
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ticket-custom] | |
progress = select | |
progress.label = Progress | |
progress.options = not started yet|started|ready for QA|tested but has bugs|testing passed|ready for staging|posted to staging|ready for production|posted to production|needs client approval|needs client feedback|needs PM clarification|can't replicate | |
estimate = text | |
estimate.format = plain | |
estimate.label = Hour Estimate | |
percent = select | |
percent.label = Percent Complete | |
percent.options = 0%|25%|50%|75%|100% | |
testing_required = checkbox | |
testing_required.label = Requires Testing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! user/bin/perl | |
$path = '/data/trac/'; | |
$file = '/conf/trac.ini'; | |
print "Enter Name of project:"; | |
$project = <>; | |
$project =~ s/\r|\n//g; | |
$projectdir = $path . $project; | |
$filename = $path . $project . $file; | |
print $filename; | |
if(-e $filename) { | |
print 'FOUND'; | |
`cat ~/custom.ini >> $filename`; | |
`trac-admin $projectdir/ ticket_type add test`; | |
`trac-admin $projectdir/ ticket_type add define`; | |
`trac-admin $projectdir/ ticket_type add requirement`; | |
`trac-admin $projectdir/ priority add backlog`; | |
`trac-admin $projectdir/ ticket_type add deferred`; | |
}else{ | |
print 'NOT FOUND'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment