Forums

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

Smart value to define the condition: if automation runs in the last 2 weeks of the Quarter then...

Damien_R
Contributor
January 11, 2024

I'm trying to add a logic to an automation that's manually triggered.

We make multiple Sprints to release a new version each Quarter.

On the Scrum board, when preparing the Sprints, I'm already auto tagging via automation the current Version (Q1 for example) when the Sprint is within the Quarter.

But I would like to be able to then tag the next version automatically when we prepare the next Sprint in the last 2 weeks of the Quarter.

As the last Sprint review of the Quarter should be allocated to Q2 and not Q1.

I'm after a Smart Value or logic to define the condition: if automation runs in the last 2 weeks of the Quarter then add to the "next version by date".

Thanks in advance for your help and insight :)

1 answer

0 votes
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 11, 2024

Hi @Damien_R - This is an interesting requirement.  You could try something like this which will evaluate whether the Month is one of the end of quarter months AND the current day of month is within 14 days of the end of quarter.

  • IF CONDITION
    This will determine if we're in March and date DOES NOT meet parameters
    • {{now.format.("M")}}
      EQUALS
      3
    • AND
    • {{#}}{{now.format.("d")}}+14{{/}}
      GREATER THAN
      31
  • ELSE CONDITION
    This will determine if we're in June and date DOES NOT meet parameters
    • {{now.format.("M")}}
      EQUALS
      6
    • AND
    • {{#}}{{now.format.("d")}}+14{{/}}
      GREATER THAN
      30
  • ELSE CONDITION
    This will determine if we're in September and date DOES NOT meet parameters
    • {{now.format.("M")}}
      EQUALS
      9
    • AND
    • {{#}}{{now.format.("d")}}+14{{/}}
      GREATER THAN
      30
  • ELSE CONDITION
    This will determine if we're in December and date DOES NOT meet parameters
    • {{now.format.("M")}}
      EQUALS
      12
    • AND
    • {{#}}{{now.format.("d")}}+14{{/}}
      GREATER THAN
      31
  • ELSE
    This covers everything else... It's within the parameters
Bill Sheboy
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.
January 11, 2024

Hi @Damien_R 

Adding to Mark's answer, I believe this could be done using math operations with integer division and mod (wrapping for years), reducing the need for the if / else structure. 

Please note, your scenario is quite specific and so I have not tried this.

Kind regards,
Bill

Damien_R
Contributor
January 15, 2024

Thanks @Mark Segall and @Bill Sheboy - we're going to give it a try and see if we have further questions. Or just confirm if it works!! :)

I thought it would have been a common need for people planning in quarters with a bit of automation. 

Like Mark Segall likes this

Suggest an answer

Log in or Sign up to answer