Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-13052

Add support for using a placeholder for custom field of request type in Assets custom field's filter issue scope on customer portal

    • 11
    • 7
    • We collect Jira Service Desk feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Issue Summary

      This is reproducible on Data Center: (yes)

      In our documentation we note (at the bottom of the page):

      The "issuetype" placeholder does not work in Service Desk requests. You must use a custom field instead. For example, this query in JSD will not return any objects:

      "Related JIRA Projects" = currentProject() AND "Related JIRA Issue Types"."Name" in (${issuetype.label}) AND Status = "Active"

      Whereas this will:

      "Related JIRA Projects" = currentProject() AND ("Related JIRA Issue Types"."Name" in (${issuetype.label}) OR "Related JIRA Issue Types"."Name" in (${customfield_10654})) AND Status = "Active"4

      As there is no RequestType placeholder (see JSDSERVER-7425), you can refer to the Request Type Field, and filter Object referencing a Specific "Issue type" Object.

      This used to work in previous versions of Insight, where ${customfield_10654} or ${customfield_10654.name} referred to the Customer Request Type in JSD and returned a value such as:

      onboard/getithelp

      (< Lower case project key >/ <Lower case request type name no whitespaces>)

      This stopped working (not sure at which version).

      However: using a postfunction to set an Object's Attribute with a predefined value, using ${customfield_10654} - we do get the expected results, and the text attribute will be set with: onboard/getithelp accordingly!

      It seems like the placeholder is broken within the CF's Filter Issue Scope context

      Steps to Reproduce

      1. Create a few objects - with their Name set to the following format: <projectKeyLower>/<requestTypeLowerNoWhitespace>
        For exanple, for my ITSM project:
        itsm/getithelp
        itsm/requestanewaccount
        Add a text attribute "TEST" to your object type - leave it empty for now
      2. Enable your Schema to the JSM portal (see Schema Configuration>Roles tab)
      3. Set up Assets Customfield to show the above objects in the Create form, use the AQL:
        Filter scope: objectType=MyOT
        Filter Issue Scope: Name = ${customfield_10654.name}
        //customfield_10654 is the Customer Request Type
      4. Edit the Get IT Help request type's workflow, and add an Assets postfunction:
        Set the value of the TEXT Attribute of the object in the above Assets customfield with a predefined value: ${customfield_10654.name}. Move the postfunction to execute AFTER Issue Created postfunction and publish the changes.
      5. Create a Ticket through the JSM portal, or click Create in Jira, open a Request Type: Get IT Help

      Expected Results

      In the Create form - once we select the Get IT Help request type - we can select the object with Name = itsm/getithelp

      Once the ticket is created - the postfunction will populate TEXT with "itsm/getithelp"

      Actual Results

      The Assets Customfield cannot find any object to select.

      Edit the Assets CF configuration by removing the Filter Issue scope and try again to create a ticket. You should be able to select ANY object of the MyOT object Type.
      Once the ticket is created - check the object selected, its TEXT attribute will populate with "itsm/getithelp" (or any other request type)

      ...
      

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

          Form Name

            [JSDSERVER-13052] Add support for using a placeholder for custom field of request type in Assets custom field's filter issue scope on customer portal

            SET Analytics Bot made changes -
            UIS Original: 12 New: 11
            SET Analytics Bot made changes -
            UIS Original: 11 New: 12
            SET Analytics Bot made changes -
            UIS Original: 12 New: 11
            SET Analytics Bot made changes -
            UIS Original: 11 New: 12
            SET Analytics Bot made changes -
            UIS Original: 12 New: 11
            SET Analytics Bot made changes -
            UIS Original: 11 New: 12
            SET Analytics Bot made changes -
            UIS Original: 12 New: 11
            SET Analytics Bot made changes -
            UIS Original: 11 New: 12
            SET Analytics Bot made changes -
            Support reference count Original: 2 New: 7
            SET Analytics Bot made changes -
            UIS Original: 6 New: 11

              da0dd4439f59 Alex Cooksey
              8cdc82c96fd5 Yinon Negev
              Votes:
              14 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: