The script empties Assignee if another field changes, in this case the custom field Location
<script type="text/javascript">
jQuery(document).ready(function() {
var location_fld = document.getElementById("customfield_10505");
var assignee_fld = document.getElementById("assignee");
location_fld.onchange = function(){
assignee_fld.value = "";
}
});
</script>
I am a novice at modifing JIRA with scripts so please don't provide me a geeky response that I can't follow. This is a new copy of JIRA on a new server, not an upgrade, so maybe a missing plugin or configuration is at fault.
The code was breaking the maintenance page for Custom Fields so I removed it. I will need to readdress this later when I have the time. Thanks for your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had seen the JIRA.bind... on responses to other questions but did not know what it was for. Anyway I applied it but the problem remains. Do these scripts still go in the description field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
your code also seems correct but you have to include that in following event
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) { //your logic here });
you can try with following code
<script type="text/javascript"> jQuery(document).ready(function($) { JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) { clearAssignee(); }); clearAssignee(); function clearAssignee(){ $('#customfield_10505').change(function() { $('#assignee').val(''); }): } }); </script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the bind event is used here to execute the JavaScript on popup's(ex. create issue, transition, edit issue popup's ).
yes, it should be added in description of custom field in field configuration
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you are modifying JIRA templates to insert your own scripts, you may need to encounter "geeky" answers...
Instead of using jquery, use AJS, atlassian's wrapper.
AJS.$(document).ready(function() {
Second, use the page source view (ctrl+U in chrome) to verify that the IDs are both still valid.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm afraid I'm on a timelime and JIRA is not my normal responsibility. I don't have the time to learn AJS, when I finish this project I will probably not use JIRA for some time as my job is Unix/Linux support.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.