Hi,
I have number of issue types (epic, story new feature etc.) I want temporarily disable people creating issue type 'New Feature' for a few days.
I tried to remove issue type from my scheme but that meant i would have to migrate current new features to another issue type, which is not an option.
Any ideas how can this be done?
you can hide issuetype with Javascript , try something like this by adding in footer.jsp or load it as webresource in any plugin
<script type="text/javascript"> 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()) == 'Defect'){ $(this).remove(); } }); } }); </script>
Hi Prasad,
I have added this in my web resource, but the script is working only up to the alert,Control is going in side each function. Is there any change in JIRA 7.
function
hide(){
$(
"#issuetype option"
).each(
function
() {
alert('In issue options');
if
($.trim($(
this
).text()) ==
'Defect'
){
$(
this
).remove();
}
});
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Suresh and @RambanamP
Were you able to resolve this with webresource. I stuck with the same problem the script works upto alert. I am on jira 7.2.3 Can you please guide me.
Thankyou!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Deepali Bagul if you are getting alert that means webresource module is working fine.
project and issue type field implementation got changed on latest jira versions so you need to understand these fields implementation first.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thankyou for pointing me to right direction field implementation.
Below is the javascript that worked for me on jira 7.2.3 with webresource.
<script> jQuery(document).ready(function() { var removeIssueType = function() { jQuery(".aui-list-item-link").filter(function(){ return jQuery(this).text() === "Role Mapper" }).parent().hide(); } var findIssueType = function() { jQuery("span.drop-menu").click(removeIssueType); jQuery("#issuetype-field").keyup(removeIssueType); jQuery("#issuetype-field").click(function() { setTimeout(removeIssueType, 1); }); jQuery("#project").change(function() { setTimeout(findIssueType, 1000); }); } //if (AJS.params.loggedInUser !== "") { JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function(e,context) { findIssueType(); }); setTimeout(findIssueType, 500); //} }); </script>
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.
I don't have option to edit @Deepali Bagul comment so am adding as answer with proper format so it will help others
<script>
jQuery(document).ready(function($) {
var removeIssueType = function() {
$(".aui-list-item-link").filter(function(){return $(this).text() === "Role Mapper" }).parent().hide();
}
var findIssueType = function() {
$("span.drop-menu").click(removeIssueType);
$("#issuetype-field").keyup(removeIssueType);
$("#issuetype-field").click(function() {
setTimeout(removeIssueType, 1);
});
$("#project").change(function() {
setTimeout(findIssueType, 1000);
});
}
JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function(e,context) {
findIssueType();
});
setTimeout(findIssueType, 500);
});
</script>
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.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline 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.