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

Invalid request type behavior when moving a Service Desk request to a new project

    XMLWordPrintable

Details

    Description

      Summary

      When a request is moved from one Service Desk project to another one. the Request Type field shows as "no match".
      Even though the Request Type does not seem to be set, the 2 following behaviors happen:

      1. The Request is still visible from the Customer Portal (which is incorrect, since the Request Type needs to be set for a request to show on the portal)
      2. It will be impossible to find this request in the issue search by using the JQL query "Customer Request Type" is EMPTY (even though the Request Type shows as "no match")

      Steps to reproduce

      1. Install a fresh JIRA 8.1.0 instance with JSD 4.1.0
      2. Create 2 Service Desk projects (Let's call them BASICSD and SDTEST)
      3. Create a ticket in the project BASICD from the customer portal
      4. Open this ticket from the JIRA UI and verify that the request type is set (it does not show as "no match"), and that the Channel is set to "Portal":
      5. Move the ticket from BASICSD to SDTEST and do not select a Request Type during the step 3 of the moving process:

      6. After the ticket is moved, verify that the channel is still set to "Portal" and that the Request Type field is empty (No match):
      7. Try to look for this ticket (issue key SDTEST-108) by searching for tickets with empty Request Type
        "Customer Request Type" is EMPTY AND issuekey = SDTEST-108
        

      Actual Results

      1. The JQL query does not return any result
      2. However, the following JQL query returns the request SDTEST-108
        "Customer Request Type" is not EMPTY AND issuekey = SDTEST-108
        

      1. The link "View customer request" is visible when opening the request from the JIRA View, and when clicking on it, the Request can be seen from the customer portal:

      Expected Results

      1. The JQL query should find the request, like it's the case when a Service Desk request is created from the JIRA UI:
      2. The link "View customer request" should not be visible when opening the request from the JIRA View and the request should not be accessible from the customer portal, like it's the case when a Service Desk request is created from the JIRA UI:

      Workaround

      To determine which Service Desk requests are impacted by this issue, run the following query in the Jira DB.

      select p.pkey as "projectkey", ji.issuenum, cfv.stringvalue as "requesttype", ep.json_value as "channel"
      from jiraissue ji inner join project p on ji.project = p.id
              left join entity_property ep on ep.entity_id = ji.id and ep.property_key = 'request.channel.type'
              left join customfieldvalue cfv on ji.id = cfv.issue and
                      cfv.customfield = (select id from customfield where cfname = 'Customer Request Type')
      where ep.json_value like '%portal%' and p.pkey = '<PROJECT_KEY_UPPERCASE>' and cfv.stringvalue not like '<PROJECT_KEY_LOWER_CASE>/%' order by 2;
      

      This query will return the project key and issue number of the impacted tickets. You may then bulk edit them in JIRA Issue Navigator and give them a valid request type value.

      Notes Regarding the workaround:

      • This query has been tested in Postgres, and might need to be slightly changed for other DB
      • You need to replace in the query:
        • <PROJECT_KEY_UPPERCASE> with the project key in upper case
        • <PROJECT_KEY_LOWER_CASE> with the project key lower case

      For example, if the impacted project is SDTEST, the query will be:

      select p.pkey as "projectkey", ji.issuenum, cfv.stringvalue as "requesttype", ep.json_value as "channel"
      from jiraissue ji inner join project p on ji.project = p.id
              left join entity_property ep on ep.entity_id = ji.id and ep.property_key = 'request.channel.type'
              left join customfieldvalue cfv on ji.id = cfv.issue and
                      cfv.customfield = (select id from customfield where cfname = 'Customer Request Type')
      where ep.json_value like '%portal%' and p.pkey = 'SDTEST' and cfv.stringvalue not like 'sdtest/%' order by 2;
      
      

      Attachments

        1. Step8.png
          Step8.png
          65 kB
        2. Step6.png
          Step6.png
          93 kB
        3. Step2.png
          Step2.png
          75 kB
        4. step9.png
          step9.png
          122 kB
        5. Step7.png
          Step7.png
          152 kB
        6. Step3.png
          Step3.png
          70 kB
        7. Step5.png
          Step5.png
          85 kB
        8. Step4.png
          Step4.png
          179 kB
        9. Step1.png
          Step1.png
          186 kB

        Issue Links

          Activity

            People

              mreil1 Markus Reil (Inactive)
              jrey Julien Rey
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Backbone Issue Sync