Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-27938

nuxeo-directory-suggestion does not resolve value in a task screen

    XMLWordPrintable

    Details

    • Release Notes Summary:
      nuxeo-directory-suggestion fully resolves entities in Task screens.
    • Tags:
    • Backlog priority:
      650
    • Sprint:
      nxGang Sprint 11.1.16, nxGang Sprint 11.1.17
    • Story Points:
      3

      Description

      Resolving directory fields in a task was fixed in NXP-26816.
      There still remains issues.

      1. create a schema with a directory field
      2. use it in a document type
      3. read it from the document in a workflow task with a code similar to:
        <!--
        `nuxeo-testvocabfromdoc-20190808110758390-approve-task-layout`
        @group Nuxeo UI
        @element nuxeo-testvocabfromdoc-20190808110758390-approve-task-layout
        -->
        <dom-module id="nuxeo-testvocabfromdoc-20190808110758390-approve-task-layout">
          <template>
            <style>
              *[role=widget] {
                padding: 5px;
              }
            </style>
            <div role="widget">
              <label>Directive</label>
              <div>[[task.directive]]</div>
            </div>
        
            <div role="widget">
              <label>Created</label>
              <div>[[formatDate(task.created)]]</div>
            </div>
        
            <nuxeo-directory-suggestion value="{{document.properties.testVocSchema:myVocabField}}" label="zelabel" directory-name="myTestVocab" readonly></nuxeo-directory-suggestion>
        
          </template>
        
          <script>
          Polymer({
            is: 'nuxeo-testvocabfromdoc-20190808110758390-approve-task-layout',
            behaviors: [Nuxeo.LayoutBehavior],
            properties: {
        
              /**
                 * @task var_testVocabFromDoc-20190808110758390-approve-task
                 */
              task: {
                type: Object,
              },
        
              /**
                 * @schema dublincore
                 */
              document: {
                type: Object,
              },
        
            }
          });
          </script>
        </dom-module>
        
      4. use the same code in a view form:
        <!--
        `nuxeo-testdocvoc-view-layout`
        @group Nuxeo UI
        @element nuxeo-testdocvoc-view-layout
        -->
        <dom-module id="nuxeo-testdocvoc-view-layout">
          <template>
            <style>
              *[role=widget] {
                padding: 5px;
              }
            </style>
            <nuxeo-directory-suggestion value="{{document.properties.testVocSchema:myVocabField}}" label="zelabel" directory-name="myTestVocab" readonly></nuxeo-directory-suggestion>
          </template>
        
          <script>
          Polymer({
            is: 'nuxeo-testdocvoc-view-layout',
            behaviors: [Nuxeo.LayoutBehavior],
            properties: {
        
              /**
                 * @doctype testDocVoc
                 */
              document: {
                type: Object,
              },
        
            }
          });
          </script>
        </dom-module>
        
      5. observe the vocabulary is correctly resolved in the view page
      6. observe in the task page (for example an approve one) that the vocabulary is resolved in the task section but not in the document section (see unresolved.png)

      Expected behavior: the field should be resolved no matter the context

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 4 hours, 5 minutes
                  1d 4h 5m

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.