Hi there,
I've a java script embeded to assignee field's description as follow:
<script type="text/javascript">
jQuery(document).ready(function($) {
function hide() {
$("#assignee").closest('div.field-group').hide();
}
hide();
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function(e, context) {
hide();
});
});
</script>
This were working fine when I try to create an issue.
Apparently, once the issue being created, when I click on "Assign", the "Assignee" field were also dissappeared.
Anyway in the javascript to differentiate "Create Issue" screen/dialog and "Assign" screen/dialog?
Thanks.
try with this
<script type="text/javascript"> jQuery(document).ready(function($) { function hide() { var creteButton = document.getElementById('create-issue-submit'); if(creteButton != null && creteButton.value =='Create' ){ $("#assignee").closest('div.field-group').hide(); }else{ $("#assignee").closest('div.field-group').show(); } } hide(); JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function(e, context) { hide(); }); }); </script>
Hi,
You can do, try to fetch the button value that is present in the create screen, the id will be like create-issue-submit and the value will be create issue, Add a if block in your code check for that condition and then execute it.This will work.
if($("#create-issue-submit").val()=="Create issue"){
// your code here
}
Hope this Helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.