[MGNLUI-3591] CommandActionTriggerListener sends pulse message with SystemContext's user Created: 16/Sep/15  Updated: 10/Nov/15  Resolved: 04/Nov/15

Status: Closed
Project: Magnolia UI
Component/s: framework
Affects Version/s: 5.3.11
Fix Version/s: 5.3.12

Type: Bug Priority: Major
Reporter: Mikaël Geljić Assignee: Oanh Thai Hoang
Resolution: Fixed Votes: 0
Labels: async, support
Remaining Estimate: 4.5h
Time Spent: 2d 3.5h
Original Estimate: 3d

Issue Links:
Relates
relates to MGNLUI-3510 Clean up async action execution Closed
causality
duplicate
duplicates MGNLUI-3563 Notify initial user upon completing a... Closed
supersession
supersedes MGNLUI-3108 Long running actions sometime do not ... Closed
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Sprint: Saigon 15, Basel 18
Story Points: 3

 Description   

Just out of the #triggerComplete code:

  • when async action completes (drumroll) async, we send the pulse message from system-context (user's context is already gone)
  • on 5.3.x *only*, we call messagesManager.sendLocalMessage(msg), which internally calls MgnlContext.getUser()... on sys-ctx

It should be trivial to remember the user, just like we do on master (in DefaultAsyncActionExecutor since the 5.4.1 refactoring), and pass it along.

  1. Let's confirm this suspicion
  2. See first raw patch at: https://gist.github.com/mkgl/05e30173624e11e9ee34
    I haven't tested it, but yes it does deserve a test-case; might be worth writing it off master's DefaultAsyncActionExecutorTest first, and then backport it into 5.3's AbstractCommandActionTest.


 Comments   
Comment by Mikaël Geljić [ 17/Sep/15 ]

Linking to MGNLUI-3510 because #sendLocalMessage was removed as part of this refactoring.

Comment by Mikaël Geljić [ 17/Sep/15 ]

Linking as superseding MGNLUI-3108 as well, because it was actually never fixed there.

Comment by Oanh Thai Hoang [ 22/Oct/15 ]

Approach to fix has been put to related ticket: https://jira.magnolia-cms.com/browse/MGNLUI-3563?focusedCommentId=114843&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-114843.

Comment by Oanh Thai Hoang [ 04/Nov/15 ]

Hi mgeljic, I have altered code due to reviewer comment (inject the Context object in c-tor Instead of using static MgnlContext#getUser())

This code apply for version 5.3.12 only. Please let me know if you want to apply for latest version also.

Generated at Mon Feb 12 09:08:09 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.