rajeshkumar created the topic: Customize changelist description field with templates
The way most of our customers add additional fields to the change description is with the use of triggers and scripts that add extra fields within the “description” field.
www.perforce.com/perforce/doc.current/ma…cmdref/triggers.html
As an example:
add-fields.py:
*********************
#!/usr/bin/python
import os
import sys
import re
import random
users = [ “cpflaum”,”cpflaum2″ ]
user = sys.argv[2]
user = user.lower()
if user in users:
tempfile = str(random.random())
input = open(sys.argv[1], “r”)
output = open(tempfile, “w”)
for line in input.readlines():
if re.search(“
output.write(line)
output.write(“\n\tMy Additonal field 1=
output.write(“\n\tMy Additonal field 2=
else:
output.write(line)
input.close()
output.close()
os.remove(sys.argv[1])
os.rename(tempfile, sys.argv[1])
********************
By – Chuck Pflaum <support@perforce.com>
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND