[MGNLCDEP-87] Dependency aware confirmation action is not configurable for arbitrary workspaces Created: 09/Sep/15  Updated: 15/Apr/16  Resolved: 29/Sep/15

Status: Closed
Project: Content Dependencies
Component/s: None
Affects Version/s: None
Fix Version/s: 1.6.1

Type: Improvement Priority: Neutral
Reporter: Philip Mundt Assignee: Sang Ngo Huu
Resolution: Fixed Votes: 0
Labels: support
Remaining Estimate: 0d
Time Spent: 2d 3.25h
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLCDEP-76 Allow for checking dependencies to an... Closed
relates to MGNLCDEP-80 Link node paths in dependencies tab Closed
relates to MGNLCDEP-85 Extend dependency aware confirmation ... Closed
dependency
depends upon MGNLUI-3603 Expose ConfirmationActionDefinition o... Closed
Template:
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)
Date of First Response:
Sprint: Basel 12
Story Points: 5

 Description   

At the moment the dependency aware confirmation action only checks dependencies to workspaces

  • website
  • dam
  • the workspace of the actual node

but is not configurable to check other references.

With MGNLCDEP-80 & MGNLCDEP-76 bringing in this feature for the actual UI element (tab and field) it would be beneficial to have similar possibilities for the confirmation action.



 Comments   
Comment by Espen Jervidalo [ 22/Sep/15 ]

make the underlying info.magnolia.ui.framework.action.ConfirmationAction parameterized so we don't have to cast the definition.

Comment by Sang Ngo Huu [ 23/Sep/15 ]

Hi Espen, I used info.magnolia.module.dependencies.field.ReferencesDefinition for both info.magnolia.module.dependencies.field.DependenciesFieldDefinition and info.magnolia.module.dependencies.action.DependencyAwareConfirmationActionDefinition that implemented from info.magnolia.ui.form.field.definition.FieldDefinition and info.magnolia.ui.api.action.ActionDefinition. So, in info.magnolia.module.dependencies.field.ReferencesDefinitionKeyGenerator the parent must be cast.

Please give me more detail if I have any mistake. Thanks

Comment by Sang Ngo Huu [ 23/Sep/15 ]

BTW, DependencyAwareConfirmationAction extends ConfirmationAction without parameterized, so getDefinition() function return ConfirmationActionDefinition. So It must be cast to DependencyAwareConfirmationActionDefinition.

 boolean getOtherReferences = true;
        String currentWorkspace = jcrItem.getSession().getWorkspace().getName();
        List<ReferencesDefinition> referenceDefinitions = ((DependencyAwareConfirmationActionDefinition) getDefinition()).getReferences();
        for (ReferencesDefinition refDef : referenceDefinitions) {
            label.append(buildReferenceMessage(jcrItem, refDef.getWorkspace(), refDef.getNodeType(), refDef.getLabel()));
            if (currentWorkspace.equals(refDef.getWorkspace())) {
                getOtherReferences = false;
            }
        }

Comment by Sang Ngo Huu [ 24/Sep/15 ]

Created MGNLUI-3603 to handle parameterized exposing.

Comment by Sang Ngo Huu [ 25/Sep/15 ]

Please help me review MGNLUI-3603 first.

Comment by Federico Grilli [ 29/Sep/15 ]

Integration is causing migration diffs

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