Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Update start and end date and skip holidays

Muhammad Moazzam Hassan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 30, 2023

Hi,

I want to update my end date on the basis of the start date and duration in days given, I have achieved it, now I want to skip holidays like 25th Decemeber is the holiday and start date and end date is lies in between this date so add one day more in end date. How can we manage that?

1 answer

1 vote
Ste Wright
Community Champion
November 30, 2023

Hi @Muhammad Moazzam Hassan 

Can you provide some more information...

  • How does your existing rule work? Screenshots and/or details of the rule would be useful
  • What other holidays would you like to skip?

Ste

Muhammad Moazzam Hassan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 30, 2023

Hi, 

I have a simple scenario which I want to update my end date on the basis of the Start Date and Total Days Value, but I want to manage holidays as well like Eid, Christmas, and Thanksgiving. 

image.png

Ste Wright
Community Champion
December 1, 2023

Hi @Muhammad Moazzam Hassan 

The plusBusinessDays will avoid weekends.

I feel like for holidays, it might be easier to use a separate rule and IF/ELSE statements.

---

For example...

  • Trigger: Field Value Changed
    • Field to Monitor = Planned Start Date
  • Condition: IF Block...
    • IF...
      • Condition: Issue Fields Condition
        • Field = Planned Start Date
        • Condition = equals
        • Date = Specific Date - 25/12/2023
      • Action: Edit Issue
        • Field = Planned Start Date
          • Value = {{issue.Planned Start Date.plusBusinessDays(1)}}
    • ELSE-IF...
      • ...etc

---

A few notes on this rule...

  • If the first rule can trigger the second rule, ensure you allow for this by checking the appropriate checkbox in "Rule Details"
  • You'd need to update this rule once yearly if you use static dates. There's alternatives, but some holidays do change date each year also.

---

Let us know what you think!

Ste

Muhammad Moazzam Hassan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 1, 2023

I knew this solution, but this is not the only objective because the holidays can be multiple in a year, so I want to check the holidays occurs in between start or end date or equals to as well, this solution only solves the equals to query, what if the holidays occurs in between the start date and end  date and more than one holiday occurs in between?

Muhammad Moazzam Hassan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 1, 2023

I have designed this rule, I have use the Lable field because there is not multi-date custom field in Jira, I have added some holidays in the label field in the desired format("yyyy/mm/dd"). I am able to retrieve what is in between and how many holidays occurs in between, but there is silly bug in this for each rule that whether it runs one time or 1000 times it only increments on on whole cycle.







01-December-2023 (352).png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events