I want to perform an action/change to all issues referenced in a specific version.
e.g. during a 'SIL Post-function Function' I want to set the value for a hidden custom field to a specific value, for all issues references in the version selected in a 'version-picker custom field'. For example, for all issues fixed in version "4.1.0.0" I like to set the value of the custom field "check" to "true".
Could someone please help me with the correct syntax?
Hi Lucas,
This can be achieved using the selectIssues routine that accepts a jql as parameter:
string[] issues = selectIssues("fixVersion = 4.1.0.0");
for(string iss in issues) {
%iss%.check = true;
}
Hi Elexandru, thank you very much! I am amased by the power of this addon.
Some remaining questions :)
I now have (which is not working):
string[] BaselineVersion = Baseline; string[] issues = selectIssues(BaselineVersion); for(string iss in issues) { %iss%.Locked = "Yes"; }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. For the selectIssues routine you have to provide a jql as parameter (eg "Baseline = 4.1.0"). You forgot the "Baseline = " part. Notice also that the Baseline value must pe cast to string before using it in the jql. Just store it in a string variable and use that instead:
string BaselineVersion = Baseline;
string[] issues = selectIssues("Baseline = " + BaselineVersion);
for(string iss in issues) {
%iss%.Locked = "Yes";
}
2. Setting the value for a Select List or a Radio Button field isn't different from setting a value to a text field:
%iss%.SelectList = "Yes";
%iss%.Radio = "Yes";
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks you so much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you please have another look at the code snippit, it is not working for me (Archiving works but changing the text value is not):
See screenshot below after pressing the "Lock Baseline" version. I hoped the value for the text field "Locked" was set to "Yes"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try to put selectIssues("Baseline = '" + BaselineVersion + "'"). If the version name has more than one word, as in your case, it must be surrounded by quotes in the jql. Let me know if this solves your problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Works, you are a champ! Great tool and great support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.