2010 views

Description

When upgrading an instance from Helsinki Patch 7 to Istanbul Patch 1, the survey URL is not generated on existing, base system surveys.

Steps to Reproduce

 

  1. Open an instance with:
    • Helsinki Patch 7 installed
    • Service Portal not installed
  2. Navigate to Survey > View Surveys.
  3. Open any base system survey, for example, Change Request Satisfaction Survey.
  4. In Related Links, click View Survey URL.
    Note that the survey URL is displayed.



  5. Upgrade the instance to Istanbul Patch 1.
  6. Navigate to Survey > View Surveys.
  7. Open the same survey you opened in step 3, for example, Change Request Satisfaction Survey.
  8. In Related Links, click View Survey URL.
    Note that the URL is blank and nothing is displayed. The URL will also be blank in the email redirection and email notifications for the survey.

Workaround

  1. Navigate to System Definition > Script Includes.
  2. Find and open the record for the AssessmentUtils script include.
  3. Replace the Original Code with the New Code in the AssessmentUtils script include: 

    Original Code: 

    redirectToPortal : function(){ 
    var redirectToPortal = pm.isActive("com.glide.service-portal") 
    && pm.isActive("com.glide.service-portal.survey"); 
    var emailRedirectProp = gs.getProperty("sn_portal_surveys.sp_survey.email_redirection", false); 
    var hasDefaultPortal = false; 

    var gr = new GlideRecord('sp_portal'); 
    gr.addQuery('default', 'true'); 
    gr.query(); 
    if (gr.next()) { 
    hasDefaultPortal = true; 
    this.defaultServicePortal = gr.getValue('url_suffix'); 


    redirectToPortal = redirectToPortal && hasDefaultPortal && emailRedirectProp; 
    return redirectToPortal; 
    }, 


    New Code that will fix the issue: 

    redirectToPortal : function(){ 
    var isServicePortalActive = pm.isActive("com.glide.service-portal") 
    && pm.isActive("com.glide.service-portal.survey"); 
    var emailRedirectProp = gs.getProperty("sn_portal_surveys.sp_survey.email_redirection", false); 
    var hasDefaultPortal = false; 
    var redirectToPortal = false; 
    if(isServicePortalActive){ 
    var gr = new GlideRecord('sp_portal'); 
    gr.addQuery('default', 'true'); 
    gr.query(); 
    if (gr.next()) { 
    hasDefaultPortal = true; 
    this.defaultServicePortal = gr.getValue('url_suffix'); 


    redirectToPortal = isServicePortalActive && hasDefaultPortal && emailRedirectProp; 
    return redirectToPortal; 
    }, 

    This workaround will make it so you don't have to activate the Service Portal if you are not ready to do so. 

  4. Click Update.

Related Problem: PRB819936

Seen In

There is no data to report.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2017-06-16 13:35:23
Published:2017-03-02