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

Update events to pass old record state to handlers

    Details

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

      Description

      See Event Handlers for a list of events that would need to be considered.

      Effectively, whenever an event is triggered for a non-add action, and we have an instance of the record, the record should be passed along to the event handler representing it's original state before having just been changed.

      For example, when editing a service, the Services::edit event is triggered and includes the service ID (service_id) and the data used to update the service (vars). This task aims to update this to also pass an object representing the original service record prior to being updated (e.g. prior_service). The same behavior should be applied to other events (e.g. Packages::edit, Packages::delete, etc.).

        Activity

        Automated transition triggered when Tyson Phillips (Inactive) merged pull request #399 in Stash -
        Status In Review [ 5 ] Closed [ 6 ]
        jonathan Jonathan Reissmueller made changes -
        Time Spent 1 hour, 50 minutes [ 6600 ] 2 hours, 22 minutes [ 8520 ]
        Worklog Id 10811 [ 10811 ]
        jonathan Jonathan Reissmueller made changes -
        Time Spent 1 hour, 24 minutes [ 5040 ] 1 hour, 50 minutes [ 6600 ]
        Worklog Id 10810 [ 10810 ]
        jonathan Jonathan Reissmueller made changes -
        Time Spent 1 hour, 15 minutes [ 4500 ] 1 hour, 24 minutes [ 5040 ]
        Worklog Id 10775 [ 10775 ]
        tyson Tyson Phillips (Inactive) made changes -
        Sprint 4.3.0 Sprint 2, 4.3.0 Sprint 3 [ 52, 53 ] 4.3.0 Sprint 2, 4.3.0 Sprint 3, 4.3.0 Sprint 4 [ 52, 53, 54 ]
        Automated transition triggered when Jonathan Reissmueller created pull request #399 in Stash -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        jonathan Jonathan Reissmueller made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 1 hour, 15 minutes [ 4500 ]
        Worklog Id 10754 [ 10754 ]
        Automated transition triggered when Jonathan Reissmueller created a branch in Stash -
        Status Open [ 1 ] In Progress [ 3 ]
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Sprint 4.3.0 Sprint 2 [ 52 ] 4.3.0 Sprint 2, 4.3.0 Sprint 3 [ 52, 53 ]
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked lower
        tyson Tyson Phillips (Inactive) made changes -
        Sprint 4.3.0 Sprint 1 [ 49 ] 4.3.0 Sprint 2 [ 52 ]
        tyson Tyson Phillips (Inactive) made changes -
        Assignee Jonathan Reissmueller [ jonathan ]
        tyson Tyson Phillips (Inactive) made changes -
        Fix Version/s 4.3.0-b1 [ 11019 ]
        tyson Tyson Phillips (Inactive) made changes -
        Description See [Event Handlers|https://docs.blesta.com/display/dev/Event+Handlers] for a list of events that would need to be considered.

        Effectively, whenever an event is triggered for a _non-add_ action, and we have an instance of the record, the record should be passed along to the event handler representing it's original state before having just been changed.

        For example, when editing a service, the _Services::edit_ event is triggered and includes the service ID (_service_id_) and the data used to update the service (_vars_). This task aims to update this to also pass an object representing the original service record prior to being updated (e.g. _previous_service_). The same behavior should be applied to other events (e.g. Packages::edit, Packages::delete, etc.).
        See [Event Handlers|https://docs.blesta.com/display/dev/Event+Handlers] for a list of events that would need to be considered.

        Effectively, whenever an event is triggered for a _non-add_ action, and we have an instance of the record, the record should be passed along to the event handler representing it's original state before having just been changed.

        For example, when editing a service, the _Services::edit_ event is triggered and includes the service ID (_service_id_) and the data used to update the service (_vars_). This task aims to update this to also pass an object representing the original service record prior to being updated (e.g. _prior_service_). The same behavior should be applied to other events (e.g. Packages::edit, Packages::delete, etc.).
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Sprint 4.3.0 Sprint 1 [ 49 ]
        tyson Tyson Phillips (Inactive) made changes -
        Story Points 8
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked lower
        tyson Tyson Phillips (Inactive) made changes -
        Field Original Value New Value
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              15/Jun/18

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 2 hours, 22 minutes
              2h 22m

                Agile