Hi everyone
I am trying to update my expected Due Date from the Created Date.(Created date+5)
I want to exclude weekends (Saturday and Sunday) when calculating the Expected Due Date.
Is there any way to Calculate due date except Saturday, Sunday and holidays??
Thanks for the solution.
I have use your solution also But i can't able to update due date for issue and also my Due date custom field is present on view issue screen. I have attached the screenshot. please check it and tell me where i am wrong.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Vrushali Hasbe ,
Please use this script :
Calendar c1 = GregorianCalendar.getInstance();
c1.setTime(new Date())
for(int i=1;i<=5;i++){
c1.add(Calendar.DAY_OF_MONTH, 1);
if (c1.get(Calendar.DAY_OF_WEEK) == Calendar.SATURDAY)
c1.add(Calendar.DAY_OF_MONTH, 1);
if (c1.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY)
c1.add(Calendar.DAY_OF_MONTH, 1);
}
c1.clearTime().getTime().toTimestamp()
Antoine
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.
Hi @Vrushali Hasbe , glad it worked out. Please make sure to accept the answer so it can help others too.
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.
Hi @Vrushali Hasbe ,
A similar question https://community.atlassian.com/t5/Jira-Core-questions/How-do-I-automatically-set-the-Due-Date-of-an-issue-via-a/qaq-p/441125
I suppose resolution depend which plugin You are using.
B.R.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Andrew
I am using Scriptrunner plugin for Jira plugin.
And also I have tried script that I have found online but it do not work for me.
I want to set due excluding Saturday and Sunday and public holidays
Suppose Today i have created one issue then my due date will be current date+2.
If i create issue on Friday means my due date will be (current date+2) but excluding Saturday and Sunday. means the date present on Tuesday.
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.