Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-6007

Dynamic generated contentType based apps: Usage of 'jcrName' and 'name' property unclear

    XMLWordPrintable

Details

    • Yes
    • UI FW 11, UI FW 12, UI FW 13
    • 8

    Description

      Tested:

      On current 6.2.2-SNAPSHOT

      Situation:

      contentType 'event' contains a model.
      App 'events' uses contentType 'event' with: !content-type:event

      Scope of questions:

      • Detail-Form of App always gets a field 'jcrName' labelled 'Tag Name'
        Its behavior, why etc, I find strange and I'm not sure about:
      • how its behavior really should be (is it bug or not?).
      • how to achieve old & simple use cases as its behaviour changed (using property 'name')

      Strange things I observed:
      -> JCR app shows always 'jcrName' prop value as Node name, and not the physical node name itself.
      -> Export of the nodes of course have the node name with dashes
      -> Content App (here 'events') shows the 'physical node name' or 'name' property as node name, but ignores completely 'jcrName' (in opposite to JCR app). 

      Former use case:

      One defines via 'name' property in the contentType's model the possibility to:

      • Define the jcr-node name (automatically with dashes) and also a "display name" of the node without dashes
      • Apps use the value of 'name' property to show its "display name"
        For example: an Event name could become "Event One" and its jcr node name was aligned to "Event-One"

      Only one field in the details form is the goal!

      Problem now:

      • One will always get the field "Tag Name" which is in the end the property 'jcrName'
      • One can not not have this field 'jcrName', but using 'name' instead.
      • But some apps use once 'jcrName' (JCR APP) others 'name' (content App) to display the nodes name.
      • Dynamic ContentType based apps create the initial view in the workbench wrong using 'name' instead of 'jcrName':

      No proper way to define an "Event Name".
      Just a name of a custom content type based data set where the node name should be kept aligned to the items name.
      Formerly done over the 'name' property.

      Situation:

      Case 1 & 2 behave absolutely the the same (always yellow in print screens):

      Case 1:

      #Case 1 - no 'name' or 'jcrName'
      datasource:
       workspace: events
       namespaces:
       mt: https://www.magnolia-travel.com/jcr/1.0/mt
       autoCreate: true
      model:
       nodeType: event
       properties:
       - name: location
         required: true
      

       Case 1: 

      #Case 2 - only 'jcrName'
      datasource:
       workspace: events
       namespaces:
       mt: https://www.magnolia-travel.com/jcr/1.0/mt
       autoCreate: true
      model:
       nodeType: event
       properties:
       - name: jcrName
         required: true
       - name: location
         required: true
      

      Case 3:

      #Case 3 - all possible names. Especially former working 'name'
      datasource:
       workspace: events
       namespaces:
       mt: https://www.magnolia-travel.com/jcr/1.0/mt
       autoCreate: true
      model:
       nodeType: event
       properties:
       - name: jcrName
         required: true
       - name: name
         required: true
       - name: eventName
         required: true
       - name: location
         required: true
      

       

      Case 1 & 2 in the dynamic generated Detail's Form:

      Case 3 in the dynamic generated Detail's Form:

      Case 1 & 2 (yellow) and Case 3 (Orange) in JCR App:

      Case 1 & 2 (yellow) and Case 3 (Orange) in Content App:

       

      Related problem

      • -Bad auto labelling of the field created out of 'jcrName' -> "Tag Name"-
        -Should be "%ContentType-Name% Name" -> on event it would be "Event Name"--  ticketized as CONTTAGS-90

      What is the mean/wanted behavior

      To handle name for nodes including special characters (display, rename, duplicate operations):

      • 'name' property/field is used for content type autogenerated apps
      • 'jcrName' property/field is used by default for any other (manually created) JCR based app

      JCR browser shows only real node names, doesn't synchronise any property during previously mentioned operations (reminder: JCR browser is an app for developers, manipulation of content via this app should be avoided in production environment).

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                rkovarik Roman Kovařík
                cringele Christian Ringele
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Remaining Estimate - Not Specified
                      Not Specified
                      Logged:
                      Time Spent - 7h 19m
                      7h 19m