I want to get the value from other date custom field as a basis to the custom field I am about to add. Please help. Thank you!
How to get customfield value using SIL?
"From Department" is multi-select custom field, I want to know the script how to get what value is selected in "From Department".
Regards,
Sami Ahmed Shaik.
Hello,
You should add a post function with a code like this:
#{custom field name} = #{custom field name};
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks! Is there also a way wherein I could get the date when the status is set to closed? I need to stop counting of workdays once the status is closed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
#{custom field name} = #{custom field name};
You mean i can just add this in my SIL script? Cause I don't think this one works. It causes error. I want to get the value of the custom field "Severity"
Here is what I wrote:
date PreUAT;
number SLA = Severity;
date startDate = created + "1d";
string startWorkingHour = "09:00";
string endWorkingHour = "18:00";
number[] weekendDays = {7,1};
date [] holidays = {"2018-12-25", "2019-01-01", "2019-02-05", "2019-02-06", "2019-04-19", "2019-05-01", "2019-05-19", "2019-06-05", "2019-08-09", "2019-08-11", "2019-10-27", "2019-12-25"};
number hours = getWorkingInterval(created, currentDate(), startWorkingHour, endWorkingHour, weekendDays, holidays);
if (SLA == 1){
PreUAT = "1d" + startDate;
if (PreUAT < currentDate()){
}
return PreUAT;
}
else if (SLA == 2){
PreUAT = "4d" + startDate;
if (PreUAT < currentDate()){
}
return PreUAT;
}
else if (SLA == 3){
PreUAT = "7d" + startDate;
if (PreUAT < currentDate()){
return PreUAT;
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does your script compile? From what plugin is the Severity field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually I haven't tested it yet. But I changed it to it's custom field id.
date PreUAT;
string[] SLA = "customfield_10056";
date startDate = created + "1d";
string startWorkingHour = "09:00";
string endWorkingHour = "18:00";
number[] weekendDays = {7,1};
date [] holidays = {"2018-12-25", "2019-01-01", "2019-02-05", "2019-02-06", "2019-04-19", "2019-05-01", "2019-05-19", "2019-06-05", "2019-08-09", "2019-08-11", "2019-10-27", "2019-12-25"};
number hours = getWorkingInterval(created, currentDate(), startWorkingHour, endWorkingHour, weekendDays, holidays);
if ("customfield_10056" == "1-Showstopper"){
PreUAT = "1d" + startDate;
if (PreUAT < currentDate()){
}
return PreUAT;
}
else if ("customfield_10056" == "2-Major"){
PreUAT = "4d" + startDate;
if (PreUAT < currentDate()){
}
return PreUAT;
}
else if ("customfield_10056" == "3-Medium"){
PreUAT = "7d" + startDate;
if (PreUAT < currentDate()){
return PreUAT;
}
}
//missing manual input & consider weekends holidays
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.
Could you test it and say the errors you can see?
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.