Forums

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

Customizing Contact Admin form JIRA

Badrinath Varadharajan May 8, 2019

I am trying to setup the Custom Administrator form in JIRA. When I turn on the JIRA Contact Administrator form, I can see the e-mail form gets enabled by default and e-mail gets triggered successfully to JIRA-system-admins. However, I would want to use only my custom messages shown on the contact administrator form. This way, I dont want to show the e-mail form and just use my custom messages. 

By default, when the contact administrator form is turned on, it Enables users to contact administrators by displaying an email form. It Can be used with or without the custom message below.

Problem is custom messages cant be shown unless the contact administrator form is turned on. Is there a way, where I can hide the e-mail form and show only my custom message displayed on contact admin page ?

1 answer

1 accepted

1 vote
Answer accepted
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 10, 2019

Hi Badrinath,

I found a way that you could hide some of the elements on this contact administrator form.  The thing to note here is that you would still have to leave the form enabled.  However I found that I could create a javascript and place this in the announcement banner of Jira Server (sorry Jira Cloud users, you can't do this) to hide all the fields and send button, but still display your custom message.  Try adding this to your banner:

<script type="text/javascript">
// Script to hide contact admins send email form,
// But still display the Contact Admins message to end users.

AJS.toInit(function(){
if (window.location.pathname == '/secure/ContactAdministrators!default.jspa') {
AJS.$('form#contact-administrators.aui > fieldset').hide();
AJS.$('input#contact-administrators-submit.aui-button.aui-button-primary').hide();
}
});
</script>

I would hope that your contact message at least provides these end users some way to reach you, or else I fear that implementing this could cause you to end up with some frustrated users without a way to reach out to you.

I tested this in my Jira 8.1.0 version, it appears to work well.  If you find this is not working for you, please let me know what version of Jira you have, it's possible there might need to be some tweaks for this in different versions.

I hope this helps.

Andy

Badrinath Varadharajan May 11, 2019

Hi @Andy Heinzer 

Indeed, this is working on our instance of JIRA. We are using Jira version 7.12.3.
I have tested this out and the form is getting hidden now.

Thanks for your help

Suggest an answer

Log in or Sign up to answer