How To
How to change an application's acronym
in the case that an application’s acronym needs to be changed, a script will need to be run against an offline deployment of swimlane the script is a python script save the below into changeacronym py import pymongo import ssl \# id of application to change acronym on appid = "adwszk8eybt ghzz4" \# the current app acronym oldacroynm = "ir1" \# the new app acronym that will replace the old acronym no more than 4 characters newacronym= "adm" \# the address of the mongodb server mongoserver = "localhost" \# the port of the mongodb server (27017 is default port) mongoport = 27017 \# username to authenticate to mongodb as mongouser = "admin" \# password for mongodb user mongopass = "\<password>" \# mongodb database that stores the user account we are authenticating as mongoauthdatabase = "admin" mongoauthmechanism = "scram sha 256" database = pymongo mongoclient(host=mongoserver, port=mongoport, username=mongouser, password=mongopass, authsource=mongoauthdatabase, authmechanism=mongoauthmechanism, ssl=true, ssl cert reqs=ssl cert none) swimlane app = database applications find one({" id" appid}) if app is none print("application not found") quit() trackingfieldid = app\['trackingfieldid'] app\['acronym'] = newacronym for field in app\['fields'] if field\[' id'] == trackingfieldid field\['prefix'] = newacronym + ' ' database applications save(app) for record in database records find({"applicationid" appid}) new tracking full = record\['trackingfull'] replace(oldacroynm, newacronym) record\['trackingfull'] = new tracking full record\['name'] = new tracking full for value in record\['values'] if value\['k'] == trackingfieldid new tracking full value = {' v' {'v' new tracking full}} value\['v'] = new tracking full value record\['valuesdocument']\[trackingfieldid] = new tracking full database records save(record) how to use the script properly shut down the swimlane services update the variables at the top of the script to match your environment execute the python script python changeacryonym py turn swimlane services back online verify the acronym change in swimlane the application should now be changed