I have such .sil script:
if (argv["customfield_10705"]!="" || argv["customfield_10800"]!="") { string #{sum} = customfield_10705+customfield_10800; lfSet("summary",sum,true); }
But I would like to get value from custom field customfield_10705 and customfield_10800 to sum variable and it do not work. It only works like string, but i need values from this custom field, not string "customfield_10705"+"customfield_10800".
string #{sum} = "customfield_10705"+"customfield_10800";
My goal is to set value from customfield_10705 joined with value from customfield_10800 to Summary.
Community moderators have prevented the ability to post new answers.
Hi Miroslav,
You will have to use lfWatch and lfInstantHook (for create screen) routines. Your scripts should look like this:
lfWatch("customfield_10705", {"customfield_10705", "customfield_10800", "summary"}, "hook.sil"); lfWatch("customfield_10800", {"customfield_10705", "customfield_10800", "summary"}, "hook.sil"); lfWatch("description", {"customfield_10705", "customfield_10800", "summary"}, "hook.sil"); lfInstantHook({"customfield_10705", "customfield_10800", "summary"}, "hook.sil");
if (argv["customfield_10705"]!="" || argv["customfield_10800"]!="") {
// string #{sum} = argv["customfield_10705"] + argv["customfield_10800"];
//for strings -> 2 + 3 will be 23
string #{sum} = customfield_10705 + customfield_10800;
//for numbers -> 2 + 3 will be 5
lfSet("summary", sum);
}
Hope this helps,
Alexandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Miroslav,
If you want to set the summary of an issue with the values of the 2 custom fields, you can use the script below:
if (key.customfield_10705 !="" || key.customfield_10800!="") { string sum = #{customfield_10705} + #{customfield_10800}; lfSet("summary",sum,true); }
Regards,
Raluca
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have you tried:
number #{sum_number} = customfield_10705 + customfield_10800; string #{sum_string} = sum_number; lfSet("summary",sum_string,true);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, but is the same problem. It looks like, that value from custom field, is not able to save into variable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.