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
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.