Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hello Community,
I am trying to diplay the latest Release version of 6 projects in a single custom field using SIL power scrupt . Script is not working .
Can someone please review and advice .
string [] includedProjects = "LV|LW|LX|LY|LZ";
JVersion updatedVersion = getVersionFromEvent();
string project = updatedVersion.project;//get version from event
//testing from the SIL Manager
//if(isNull(project)) {
//project = "TEST";
//}
//see if project is included
if(arrayElementExists(includedProjects, project)) {
//get all version names from the project
string [] versions = admGetProjectVersions(project);
JVersion latest;
//loop through all version
for(string ver in versions) {
//get all details about the version
JVersion v = admGetProjectVersion(project, ver);
//find the latest released version
if(v.released == true) {
if(isNull(latest.releaseDate)) {
latest = v;
} else if(v.releaseDate > latest.releaseDate) {
latest = v;
}
}
}
//update customfields in the project
if(isNotNull(latest.project)) {
//get all issues in the project
string [] issues = selectIssues("project = " + latest.project);
//loop through the issues
for(string i in issues) {
//update customfield 12345
%i%.customfield_12345 = latest.name
}
}
}
Regards
Ashish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.