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

Using jira-maven-plugin for Jira 9.1 and Jira Service Desk 5.1 breaks Jira Service Desk

      Issue Summary

      When using AMPS to run jira-software and jira-servicedesk, the Service desk images and links do not work.

      Steps to Reproduce

      1. atlas-create-jira-plugin
      2. Add to pom.xml in <dependencies/>
                 <dependency>
                    <groupId>com.atlassian.jira</groupId>
                    <artifactId>jira-api</artifactId>
                    <version>${jira.version}</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>com.atlassian.servicedesk</groupId>
                    <artifactId>jira-servicedesk-api</artifactId>
                    <version>${jira.servicedesk.application.version}</version>
                    <scope>provided</scope>
                    <exclusions>
                      <exclusion>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                      </exclusion>
                    </exclusions>
                </dependency>
        
      1. Add to pom.xml in <application/>
        <applications>
                              <application>
                                <applicationKey>jira-servicedesk</applicationKey>
                                <version>${jira.servicedesk.application.version}</version>
                              </application>
                            </applications>
        
      1. Add to pom.xml in <properties/>
        <jira.version>9.1.0</jira.version>
        <jira-servicedesk.version>5.1.0</jira-servicedesk.version>
        
      1. Start Jira with atlas-run or atlas-debug
      2. Go to http://localhost:2990/jira
      3. Log in with admin/admin and create an IT Service Management project
      4. Click on Customer channels and then visit the portal

      Results

      Actual Results

      The portal looks like

      HTML image tags have undefined

      <img alt="Get IT help" class="vp-rq-icon" src="undefined/servicedesk/customershim/secure/viewavatar?avatarType=SD_REQTYPE&avatarId=10627">

       

      Going to the portal with http://localhost:2990/jira/servicedesk/customer/portal/1/create/1 shows

      As per the source graph and the soy template used, the code is been generated from the Jira service desk front end.

      {template .icon}
      
      <img {if $alt}alt="{$alt}"{else}aria-hidden="true"{/if} {if $style}style="{$style}" {/if}class="{if $class}{$class} {/if}vp-rq-icon" src="{contextPath()}
      
      {if $useCustomerShim}
      
      /servicedesk/customershim{/if}/secure/viewavatar?avatarType=SD_REQTYPE&avatarId={$iconId}" {if $title}title="{$title}"{/if} {if $dataKey}data-{$dataKey}="{$dataValue}"{/if}>
      
      {/template}
      

      The contextPath() is coming as undefined, which is the why the img url is coming as undefined.

      Expected Results

      Service Desk works as expected.

      Workaround

      Instead of using jira-maven-plugin with a Jira version, it may work with using a specific product instead

      <configuration>
                          <products>
                              <product>
                                  <id>jira</id>
                                  <instanceId>jira</instanceId>
                                  <version>${jira.version}</version>
                              </product>
                          </products>
                          <applications>
                              <application>
                                  <applicationKey>jira-servicedesk</applicationKey>
                                  <version>${jira-servicedesk.version}</version>
                              </application>
                          </applications>
      ...
                      </configuration>
      

            [JSDSERVER-11973] Using jira-maven-plugin for Jira 9.1 and Jira Service Desk 5.1 breaks Jira Service Desk

            Is there any further progress towards getting this fixed? We tried the proposed workaround when this was first opened (on a previous ticket/desk I believe) and it didn't work for us.

            Paul Campbell added a comment - Is there any further progress towards getting this fixed? We tried the proposed workaround when this was first opened (on a previous ticket/desk I believe) and it didn't work for us.

            Martin Ma added a comment -

            JSM's customer portal frontend does not work with WRM batch-mode disabled. Therefore, developers needing to develop plugins for JSM need to enable WRM batch-mode.

            The way to do it is simply to press 'b' on their keyboard while having already signed into any Jira page (and having mouse focus within the page). They'll see a 'Web resource batching enabled.' notification message on the top-right corner of their Jira page, like this:

            And then they can refresh their customer portal tab and it will start working as usual.

            Martin Ma added a comment - JSM's customer portal frontend does not work with WRM batch-mode disabled. Therefore, developers needing to develop plugins for JSM need to enable WRM batch-mode. The way to do it is simply to press 'b' on their keyboard while having already signed into any Jira page (and having mouse focus within the page). They'll see a 'Web resource batching enabled.' notification message on the top-right corner of their Jira page, like this: And then they can refresh their customer portal tab and it will start working as usual.

              Unassigned Unassigned
              jrichards@atlassian.com James Richards
              Affected customers:
              0 This affects my team
              Watchers:
              5 Start watching this issue

                Created:
                Updated: