In a project, I've got several issue types, but I need to prohibit one value on Issue creation.
This issue type just comes when a particular group with permission move issues with other issue types.
I'm in jira 5.2
Is it feasible ?
Maybe with javascript in announcement banner ?
Thanks for any help!
Community moderators have prevented the ability to post new answers.
Hi Valerie,
It's quite a common question, there are a couple of answers here:
https://answers.atlassian.com/questions/159034/hide-issue-type
Hopefully you should get what you want from there, some with Javascript, some with workflow validations.
and a related feature request
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much !
I finaly use some Javascript in the announcement banner, like described here :
https://answers.atlassian.com/questions/159034/hide-issue-type
<script type="text/javascript"> jQuery(document).ready(function($) { JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function(e,context) { $("#issuetype option").each(function() { if( $(this).text() == 'issuetype name' || $(this).text() == 'issuetypename' ){ $(this).remove(); } }); }); }); </script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This doesn't work for JIRA 7.2.3. @Rambanam Prasad any suggestions. Thanks in advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Deepali Bagul Issue type field implementation has changes on latest JIRA, in older versions it is a single select field and in latest versions it seems autocomplete field.
use firebug on firefox or dev tools on chrome and go through inspect the issuetype field to understand the implemetation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @RambanamP,
I still cannot resolve this I tried with the webresource on jira 7.2.3
Below is the code
jQuery(document).ready(function($) {
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context){
hideIssueType();
});
hideIssueType();
function hideIssueType(){
hide();
$("#project-field").change(function(){
hide();
});
}
function hide(){
$("#issuetype option").each(function(){
if($.trim($(this).text())== 'Role Mapper'){
$(this).remove();
}
});
}
});
Thanks in advance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Deepali Bagul it is not an issue with webresource, as i explained on my previous comment, you have to understand implementation of project and issue type fields, that is why i ask you to use firebug go though source of project and issue type fields.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello. I am new to scriptrunner and have the same request as discussed in this question. Can you help me understand?
How can I hide issue types on a create transition from users based on their group or project role?
Is javascrip is the only way to solve this issue?
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.
Hi @Sebastian Kouba , @Valerie AQUILA
I am using below JS in Announcement banner to restrict users from viewing "Correction" issue type as a part of drop down options under Issue Type field. But it is not working. If you could, can you please help !!
Also I am not able to find relevant logs so I don't know what is wrong.
<script type="text/javascript"> AJS.$(document).ready(function() { setInterval(function() { if(AJS.$("#project-name-val").html()=="ABC") { JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function(e,context) { AJS.$("#issuetype option").each(function() { var mystring = AJS.$(this).text(); mystring = mystring.replace(/\s/g, ''); if( AJS.$(this).text().replace(/\s/g, '') == 'Correction') { AJS.$(this).remove(); } }); }); } }, 500); }); </script>
Any help will be appreciated
Thanks a lot!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<script type="text/javascript"> jQuery(document).ready(function($) { JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function(e,context) { $("#issuetype option").each(function() { var mystring = $(this).text(); mystring = mystring.replace(/\s/g, ''); if( $(this).text().replace(/\s/g, '') == 'Activity'){ $(this).remove(); } }); }); }); </script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.