Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

cannot re-index after Jira Core upgrade from 7.13 to 8.5

Tony
Contributor
July 6, 2020

After Jira Core upgrade from 7.13 to 8.5, get the following error when trying to re-index 

Cause
Referer URL: https://tealint.tea.state.tx.us/tims/secure/admin/IndexAdmin.jspa

com.google.template.soy.tofu.SoyTofuException: When evaluating "'IndexReIndex!reindex.jspa?atl_token=' + $atlToken + '&indexingStrategy=' + $indexingStrategy": Attempted to coerce undefined value into a string.
com.google.template.soy.tofu.SoyTofuException: When evaluating "'IndexReIndex!reindex.jspa?atl_token=' + $atlToken + '&indexingStrategy=' + $indexingStrategy": Attempted to coerce undefined value into a string.
at JIRA.Templates.Admin.Index.buttonContainer(confirm-reindex.soy:65) [?:?]
at JIRA.Templates.Admin.Index.confirmReindex(Unknown Source) [?:?]
at com.google.template.soy.tofu.internal.BaseTofu.renderMainHelper(BaseTofu.java:369) [?:?]
at com.google.template.soy.tofu.internal.BaseTofu.renderMain(BaseTofu.java:322) [?:?]
at com.google.template.soy.tofu.internal.BaseTofu.access$100(BaseTofu.java:66) [?:?]
at com.google.template.soy.tofu.internal.BaseTofu$RendererImpl.render(BaseTofu.java:476) [?:?]
at com.atlassian.soy.impl.DefaultSoyManager.render(DefaultSoyManager.java:154) [?:?]
at com.atlassian.soy.impl.DefaultSoyTemplateRenderer.render(DefaultSoyTemplateRenderer.java:45) [?:?]
at com.atlassian.soy.impl.DefaultSoyTemplateRenderer.render(DefaultSoyTemplateRenderer.java:39) [?:?]
at com.atlassian.jira.web.dispatcher.JiraSoyViewDispatcher.render(JiraSoyViewDispatcher.java:48) [classes/:?]
at com.atlassian.jira.web.dispatcher.JiraSoyViewDispatcher.dispatch(JiraSoyViewDispatcher.java:38) [classes/:?]
at com.atlassian.jira.web.dispatcher.JiraWebworkViewDi

6 answers

0 votes
MattS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 10, 2015

For including in an HTML velocity template I use something like the code below. You could use a different customFieldManager method to get the field by name but be careful that you only have one custom field with that name defined

 

#set ($cf = $customFieldManager.getCustomFieldObject('customfield_10371'))
#if ($cf)
  #set ($projectObject = $issue.getProjectObject())
  #set ($issueTypeObject = $issue.getIssueTypeObject())
  #set ( $idArray = [$issueTypeObject.id] )

  #if ( $cf.isInScope($projectObject, $idArray) )
    #set ($currValue = $cf.getValue($issue))
    #if ($currValue && ! $currValue.equals(""))
<tr valign="top">
    <td style="color:${textColour};font-family:${textFontFamily};font-size:${textSize};padding:0 10px 10px 0;white-space:nowrap;">
        <strong style="font-weight:normal;color:${textSubtleColour};">$cf.name:</strong>
    </td>
    <td style="color:${textColour};font-family:${textFontFamily};font-size:${textSize};padding:0 0 10px 0;width:100%;">
      $currValue
    </td>
</tr>
    #end
  #end
#else
<tr><td>unknown field</td></tr>
#end
0 votes
Begoña Bonet
Contributor
March 4, 2015

You're rigth Srilatha, I'm using groovy. I've never used velocity.I'm sorry

 

Begoña

0 votes
Srilatha Pokala
Contributor
March 4, 2015

Thank you but looks like you are using groovy(script runner) email templates?

we are trying to update/add velocity email templates in JIRA installation (atlassian-jira\WEB-INF\classes\templates\email) 

0 votes
Begoña Bonet
Contributor
March 4, 2015

For more information about how to write the email template see:

http://docs.codehaus.org/display/GROOVY/Groovy+Templates#GroovyTemplates-GStringTemplateEngine

 

My complete e-mail template (it works for me if the customfields are configured belonging to the correct project):

 

<hr align="left" noshade="noshade" size="2" width="80%" />
<b>Código de asunto:</b> <% out <<issue.key %><br/>
<b>Tipo de asunto:</b> <% out <<issue.issueType?.name %><br/>
<% if(issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("Datos del solicitante"))) { %>
<b>Solicitante:</b> <%out <<issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("Datos del solicitante")) %><br/>
<% } %>
<% if(issue.getCreated()) { %>
<b>Fecha de creación:</b> <% out << issue.getCreated().format('dd-MM-yy HH:MM') %><br/>
<% } %>
<b>Aplicación afectada:</b> <%out <<issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("CI afectado")) %> <br/>
<hr align="left" noshade="noshade" size="2" width="80%" />
<b>Resumen:</b> <% out << issue.summary %><br/>
<% if(issue.description) { %>
<b>Descripción:</b> <% out << issue.description.replace("\n","<p/>") %>
<% } %>
<hr align="left" noshade="noshade" size="2" width="80%" />
<% if(issue.getResolutionDate()) { %>
<b>Fecha de la desestimación:</b> <% out << issue.getResolutionDate().format('dd-MM-yy HH:MM') %><br/>
<% } %>
<% if(issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("Motivo de la Desestimación"))) { %>
<b>Motivo de la desestimación:</b> <% out << issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("Motivo de la Desestimación")).replace("\n","<p/>") %><br/>
<% } %>
<hr align="left" noshade="noshade" size="2" width="80%" />
<br/>

0 votes
Srilatha Pokala
Contributor
March 4, 2015

Thank you Begona for your reply..

I have used following in my email templates, but still values are not rendered. Is it possible for you to send the whole syntax you are using? and do you have to import anything?

<%out <<issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("Equipment Name")) %>

 

<%out $issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("Equipment Name")) %>

0 votes
Begoña Bonet
Contributor
March 3, 2015

Hi Srilatha,

This code works for me in Email Template field used in the Script Listener "Send a custom e-mail":

 

<b>Aplicación afectada:</b> <%out <<issue.getCustomFieldValue(componentManager.getCustomFieldManager().getCustomFieldObjectByName("CI afectado")) %> 

 

"CI Afectado" is the name of a customfield

 

Regards,

 

Begoña

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events