Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to get custom field value using SIL & JIRA cloud and doesn't have Component Manager plug-in? Edited

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!

2 answers

0 votes

Hello,

You should add a post function with a code like this:

#{custom field name} = #{custom field name};

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. 

#{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;
}
}

Does your script compile? From what plugin is the Severity field?

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

I'm not sure if I'm doing it correctly. =(

Could you test it and say the errors you can see?

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.

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you