Create Custom Field Searcher Template

Antoine
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.
August 19, 2016

Hello all, i've two questions :

 

Is it possible to create a custom field searcher template ?

 

Is it possible to create an email template ?

3 answers

1 accepted

1 vote
Answer accepted
Toli An August 22, 2016

Email template it's simple. They stored in folder - ../atlassian-jira/WEB-INF/classes/templates/email/
you can change it. 

For Custom field search look this - https://developer.atlassian.com/jiradev/jira-platform/building-jira-add-ons/jira-plugins2-overview/jira-plugin-module-types/custom-field-plugin-module/how-to-add-searching-to-a-custom-field 

Antoine
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.
August 22, 2016

Thanks, what is the content to put into the file to change the text in the mail ?

Toli An August 23, 2016

There are 2 folders for html and text format files. It depends on the settings of which file to use.
Template files is velocity template (https://developer.atlassian.com/jiradev/jira-platform/jira-architecture/jira-templates-and-jsps/velocity-context-for-email-templates)
For example notify about closed issue - file ../email/text/issueclosed.vm

#disable_html_escaping()
#parse("templates/email/includes/issueplugins.vm")
     [ ${baseurl}/browse/${issue.getKey()}?page=${tabpanel-all} ]
#headerTitleText($i18n.getText("template.text.issue.closed", $remoteUser.displayName, $issue.key), $remoteUser.displayName)
#changes([])
#comment()
#visibilityText()
#parse("templates/email/text/includes/issuesummary.vm")
#parse("templates/email/text/includes/footer.vm")

 

 

Antoine
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.
August 23, 2016

Ok thank you Anatoly ! smile

2 votes
Antoine
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.
August 22, 2016

Is anyone know ?

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 23, 2016

You can write your own searchers, containing their own search templates, yes.  They're done as add-ons.  I've only ever written ones that search my own custom field types though, so I'm not sure if it's possible to write a searcher and add it to an existing field type.  I have a feeling that if you wanted your searcher to be used on a standard custom field (e.g. my-lovely-searcher as an option when setting up a standard multi-select list field), you have to hack the code for the field to tell it a new searcher is available.

Antoine
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.
August 23, 2016

Ok thanks, and for the mails ?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 23, 2016

See Anatoly's answer.

Renaud Delaplace November 13, 2019

Hello @Nic Brough -Adaptavist- 

I am wondering if search template could be the solution to the problem we are facing in my company. I first tried with the behaviours of the scriptrunner plugin but it did not do the job.

Here is the issue: We are opening our Jira to external partners/customers so we created a specific project for them and restricted the rights for them. But we have a custom field listing all our products/customers and we figured out that an external user even with restricted rights can see all our products/customers thanks to the autocompletion of the custom field in the advanced searching.

This is very annoying for us. What would you advise ?

Suggest an answer

Log in or Sign up to answer