Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-3112

Service suspension should evaluate calendar day

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.8.0-b1
    • Component/s: None
    • Labels:
      None

      Description

      When suspending services, it is reported that the cron may be evaluating the time since the invoice was past due + the "Suspend Services Days After Due" setting in whether to suspend the service. Because of this, some services may not be suspended for 2 days even if the Suspend Services Days After Due setting is set to 1 day.

      For example:

      • Invoice was due 2019-06-15 12:00:00
      • Suspend Services Days After Due is 1 day
      • Suspend Services cron is run at 2019-06-16 00:00:00

      Because only 12 hours elapsed since the invoice was due, even though the calendar day has changed, the service is not suspended. However, if the cron were set to run at/after 12:00:00 then it would have been suspended because the current calculation is "2019-06-15 12:00:00" + "1 day" = "2019-06-16 12:00:00".

      A workable solution may be to evaluate the day difference between the invoice due date and cron task run time from midnight in the company timezone.

        Activity

        tyson Tyson Phillips (Inactive) created issue -
        tyson Tyson Phillips (Inactive) made changes -
        Field Original Value New Value
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Story Points 3
        tyson Tyson Phillips (Inactive) made changes -
        Sprint 4.8.0 Sprint 4 [ 95 ]
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Description When suspending services, it is reported that the cron may be evaluating the time since the invoice was past due + the "Suspend Services Days After Due" setting in whether to suspend the service. Because of this, some services may not be suspended for 2 days even if the Suspend Services Days After Due setting is set to 1 day.

        For example:
        * Invoice was due 2019-06-15 12:00:00
        * Suspend Services Days After Due is 1 day
        * Suspend Services cron is run at 2019-06-16 00:00:00

        Because only 12 hours elapsed since the invoice was due, even though the calendar day has changed, the service is not suspended. However, if the cron were set to run at/after 12:00:00 then it would have been suspended because the current calculation is "2019-06-15 12:00:00" + "1 day" = "2019-06-16 12:00:00".
        When suspending services, it is reported that the cron may be evaluating the time since the invoice was past due + the "Suspend Services Days After Due" setting in whether to suspend the service. Because of this, some services may not be suspended for 2 days even if the Suspend Services Days After Due setting is set to 1 day.

        For example:
        * Invoice was due 2019-06-15 12:00:00
        * Suspend Services Days After Due is 1 day
        * Suspend Services cron is run at 2019-06-16 00:00:00

        Because only 12 hours elapsed since the invoice was due, even though the calendar day has changed, the service is not suspended. However, if the cron were set to run at/after 12:00:00 then it would have been suspended because the current calculation is "2019-06-15 12:00:00" + "1 day" = "2019-06-16 12:00:00".

        A workable solution may be to evaluate the day difference between the invoice due date and cron task run time from midnight in the company timezone.
        tyson Tyson Phillips (Inactive) made changes -
        Fix Version/s 4.8.0-b1 [ 11127 ]
        Fix Version/s Short Term [ 10800 ]
        tyson Tyson Phillips (Inactive) made changes -
        Assignee Tyson Phillips [ tyson ]
        Automated transition triggered when Tyson Phillips (Inactive) created a branch in Stash -
        Status Open [ 1 ] In Progress [ 3 ]
        Automated transition triggered when Tyson Phillips (Inactive) created pull request #753 in Stash -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        tyson Tyson Phillips (Inactive) made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 47 minutes [ 2820 ]
        Worklog Id 12726 [ 12726 ]
        jonathan Jonathan Reissmueller made changes -
        Time Spent 47 minutes [ 2820 ] 52 minutes [ 3120 ]
        Worklog Id 12727 [ 12727 ]
        Automated transition triggered when Tyson Phillips (Inactive) merged pull request #753 in Stash -
        Status In Review [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            tyson Tyson Phillips (Inactive)
            Reporter:
            tyson Tyson Phillips (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              23/Dec/19

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 52 minutes
              52m

                Agile