Modified soy files aren't being reflected

Michael Li
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 27, 2018

Details

  • We tried to modify the soy file inside "<install_dir>/atlassian-jira/WEB-INF/application-installation/jira-servicedesk-application/jira-servicedesk-3.11.1-REL-0014.jar"
  • Changes aren't reflected even after deleting
    • <install_dir>/work/Catalina/*
    • <JIRA_HOME>/plugins/.bundled-plugins
    • <JIRA_HOME>/plugins/.osgi-plugins
  • Copying the jar file to "<JIRA_HOME>/plugins/installed-plugins" doesn't help either

Background

  • I wish to remove the ability for clients to create their own customer account via the customer portal but allow anonymous users to submit email requests
    • So, I need public signup enabled
  • I don't have a specific list of customers to allow and have no access to the AD
    • So, I can't create accounts pre-emptively
    • So, I have our own AD to manage customers to provide other services
  • I haven't found a template that allows us to modify the pages to remove links pointing to the signup page

 

2 answers

1 accepted

3 votes
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 27, 2018

Hi Michael,

I'm not really an expert on customizing .jar files of plugins.  However I aware that changes can be made from versions to versions that can change the way the plugin behaves.  So while editing the soy template might have worked on previous versions of Jira service desk, I too found that editing the servicedesk-3.11.1-REL-0014.jar soy/cv-signup-hint.soy that @Philip Banh mentioned in the other thread, does not appear to work in my Service desk 3.12.1 version either.

On a related topic there is an existing feature request that seeks to allow administrator to be able to edit/customize these kinds of login pages in Jira Service Desk.  Please see https://jira.atlassian.com/browse/JSDSERVER-330 for details.   While this does not provide a clear solution to editing an existing file in the .jar file, reading through the comments I have found there are a few other possible alternatives that I think can help you here.

  1. @Italo Qualisoni [e-Core] mentioned using Scriptrunner plugin with Jira in the comment: https://jira.atlassian.com/browse/JSDSERVER-330?focusedCommentId=1716003&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1716003  It appears that you could then use a custom javascript to then hide the elements from the page.
  2. It appears that the Ultimate Theming for Jira Service Desk is able to help with this as well, in much the same way Scriptrunner might.
  3. Perhaps you can use the steps in  JIRA Service Desk Internationalization.  This Kb talks about modifying certain files for the sake of translating text on the page, but perhaps you could use this to translate these specific values of (cv.login.pub.signup.title=  AND cv.login.pub.signup.desc= )  into empty fields.   I have not tried to use this KB on current versions, but it might be worth a try.

I hope this helps, please let me know your thoughts.

Andy

Michael Li
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 1, 2018

Hello Andrew,

Thanks for the advice! I think I've been successful with using the Ultimate Theming add-on. As you mentioned, I used a similar javascript code to change the content on the login page. I don't know how well this workaround will work in future updates, but this is simple enough to replicate. 

I suspect that the KB could also work. Although why changing the i18n file works but not the soy file is another mystery altogether. It's also interesting to point out that removing the template variables from the soy value will cause the template engine to raise an error because a defined variable in the i18n file is not used.

Despite the extra license cost, I will stick with using an add-on because the i18n file doesn't seem to be designed to write a large amount of HTML. The existing feature request seems quite old, so I think we've found the best alternative for now.

Thanks again for your help and for the quick response, Andy!

Michael

0 votes
David Yu
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 Leaders.
April 5, 2023

Been trying to do this myself and here's what I've learned so far.

The soy files are compiled into js files so modifying jira-servicedesk-3.11.1-REL-0014.jar /soy/ won't help.

servicedesk-frontend-plugin-x.xx.xx-REL-xxx.jar is what you're probably after...try modifying he contents of the js files instead, rezip the jar, restart. It's not the best experience editing a minified js file with HTML scattered. Ultimately, you may need to download the JSM source, and do a build if you want to recompile from the soy files.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events