Leap Year created issue in Workflow logic

Issue #264 resolved
Keneth Rhodes created an issue

Fidel you assisted my predecessor in helping with a workflow logic the issued tickets created in JIRA with a higher than LOW LOW risk/complexity can not have a "planned start date prior to the next CAB review meeting. This logic is not working for new tickets after the leap year. Would you be able to assist me in resetting this logic?

Comments (11)

  1. Fidel Castro Armario repo owner

    Of course I will. Please, send me screenshots of the configuration that is failing: conditions, validations or post-functions.

  2. Fidel Castro Armario repo owner

    Can you please copy + paste the text of the validator, in order to be treated in a text editor? I didn't expect such a huge validation.

    Did the problem appear after a JIRA update, or a JIRA reinstallation, or any other work or incidence?

    Please, tell me the timezone of the server. You can check it up at Administration > System > System info > User Timezone.

    Do the users who are reporting the problem use the same timezone as the server? Do you have users in different timezones?

  3. Keneth Rhodes reporter

    The time zone in JIRA is America/NewYork and all users are local.

    There have been no changes to JIRA. No updates no restarts or re-installations. The validator has been working until this issue arose yesterday. I have been testing in our Model Environment and found the validator is triggering as true when the start date is March 18th at 1 AM this should be March 16th at 11:AM I will attach our documentation that was created in case the CAB Meeting needed to be altered from Wednesday at 11:00 AM to some other time. Text of the validator is below:

    Only if the following boolean expression is true: (%{Risk}="Low" AND %{Complexity}="Low") OR %{Request Exception} != Null OR dayOfTheWeek({Current date and time}, LOCAL) =(4) - 3 AND (datePart({Planned Start Date}, LOCAL) - datePart({Current date and time}, LOCAL) >=4 * {DAY} OR (datePart({Planned Start Date}, LOCAL) - datePart({Current date and time}, LOCAL)=3 {DAY} AND hour({Planned Start Date},LOCAL) >=(11))) OR dayOfTheWeek({Current date and time}, LOCAL) =(4) - 2 AND (datePart({Planned Start Date}, LOCAL) - datePart({Current date and time}, LOCAL) >=3 {DAY} OR (datePart({Planned Start Date}, LOCAL) - datePart({Current date and time}, LOCAL)=2 {DAY} AND hour({Planned Start Date},LOCAL) >=(11))) OR dayOfTheWeek({Current date and time}, LOCAL) =(4) - 1 AND (datePart({Planned Start Date}, LOCAL) - datePart({Current date and time}, LOCAL) >=2 {DAY} OR (datePart({Planned Start Date}, LOCAL) - datePart({Current date and time}, LOCAL)=1 {DAY} AND hour({Planned Start Date},LOCAL) >=(11))) OR dayOfTheWeek({Current date and time}, LOCAL) =(4) AND (datePart({Planned Start Date}, LOCAL) - datePart({Current date and time}, LOCAL) >=8 {DAY} OR (datePart({Planned Start Date}, LOCAL) - datePart({Current date and time}, LOCAL) =0 {DAY} AND hour({Planned Start Date},LOCAL) >=(11) AND hour({Current date and time},LOCAL) <(11)) OR (datePart({Planned Start Date}, LOCAL) - datePart({Current date and time}, LOCAL) >0 {DAY} AND hour({Current date and time},LOCAL) <(11)) OR (datePart({Planned Start Date}, LOCAL) - datePart({Current date and time}, LOCAL) =7 {DAY} AND hour({Planned Start Date},LOCAL) >=(11))) OR dayOfTheWeek({Current date and time}, LOCAL) =(4) + 1 AND (datePart({Planned Start Date}, LOCAL) - datePart({Current date and time}, LOCAL) >=7 {DAY} OR (datePart({Planned Start Date}, LOCAL) - datePart({Current date and time}, LOCAL)=6 {DAY} AND hour({Planned Start Date},LOCAL) >=(11))) OR dayOfTheWeek({Current date and time}, LOCAL) =(4) + 2 AND (datePart({Planned Start Date}, LOCAL) - datePart({Current date and time}, LOCAL) >=6 * {DAY} OR (datePart({Planned Start Date}, LOCAL) - datePart({Current date and time}, LOCAL)=5 {DAY} AND hour({Planned Start Date},LOCAL) >=(11))) OR dayOfTheWeek({Current date and time}, LOCAL) =(4) + 3 AND (datePart({Planned Start Date}, LOCAL) - datePart({Current date and time}, LOCAL) >=5 {DAY} OR (datePart({Planned Start Date}, LOCAL) - datePart({Current date and time}, LOCAL)=4 {DAY} AND hour({Planned Start Date},LOCAL) >=(11))) Message to show when validation fails: "Planned start date/time falls before the next CCB review meeting - Exception Approval is Required.".

  4. Fidel Castro Armario repo owner

    Can you please explain me in words what is the intended behavior of the validator?

  5. Keneth Rhodes reporter

    The validator is used to make sure any Change ticket that is higher than a LOW/LOW risk/Complexity gets reviewed at a weekly change control board meeting that is held every Wednesday at 11 AM. The validator calculates if the Planned start date in the ticket is > (Greater than) the Following Wednesday at 11:00 AM. Example: Ticket created today March 10th with a risk=Medium and Planned Start date = March 16th at 3:05 PM should be resolved as TRUE Which then forces the ticket to follow a certain flow through the overall workflow.

    As of this week the validator is not calculating correctly and is requiring a planned start date > March 18th at 12:01 AM.

  6. Fidel Castro Armario repo owner

    Keneth,

    I have implemented the same validator in a local instance of JIRA and has made some testing, and I have found that the problem is related with the fact that next weekend (on 13th March) in going to happen DST 1 hour advance in your timezone.

    I don't know exactly the cause, but next weekend your validation will work correctly again. I have made some testing and I can confirm it.

    I will keep studying the problem in order to find exactly the cause, since apparently this problem should happen.

  7. Log in to comment