Hi,
We want to hide a perticular issue type from create isuue screen for a particular project using javascript and this issue type is bieng used in other project also and we need this issue type as well in this project for searching old issues by using issue navigatior that means issuetype shoould be present in issue navigetor and not in create screen.
Community moderators have prevented the ability to post new answers.
Not exactly what you want but another approach is to use workflow permissions....
We recently "retired" an issue type from a project but couldn't remove it because they wanted to hold the old (closed) issues for their history.
So for the issue types which were now retired, we modified the workflow so that the "Create" transition, which is fired before an issue is created, had a security permission on it. e.g. project administration right
So anyone who didn't have this permission, could not create an issue but it was still available in the search screens as a valid issue type to search on.
p.s. no plugins, no modify source files....
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.
Hello,
For those still interested in a solution for this, you should also take a look at the Live Fields feature of the JJupin plugin and the lfRestrictSelectOptions routine.
You just have to configure a SIL script and associate it with the desired project, as described here: http://confluence.kepler-rominfo.com/display/JJUPIN/Live+Fields+Configuration.
You can specify on which screen to execute the script by using the "screen" argument: http://confluence.kepler-rominfo.com/display/JJUPIN/Accessing+the+current+screen.
The SIL script for restricting issue type "Improvement" for example, on the create issue screen, would look like this:
if(argv["screen"] == "create") {
lfRestrictSelectOptions("issueType", "Improvement");
}
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You could also leave it in the select list but use a validator on the workflow create transition to reject creation of new issues with that issue type.
~Matt
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 artashes,
Could you please explain how did you resolve this issue.
I also need the same requirement. Still i cant find any solution.
Thanks,
Niyas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi. You mean leave in permission scheme - browse project, and create issue - denied, right? But that not what i want. I want when user click on button Create, in create screen in field issue type was particular issue type. For example, if available 2 issue type for user then in my case i want that available 1 issue type in create screen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Cheers, Jozef..
@Artashes... if you just take it off the create screen, it's still possible to create the issue type if you have the REST API active. Just because you take something off the screem doesn't make it impossible. if you work the rules into the workflow/permission scheme, then it's secure.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No you need to create workflow scheme for given project with specific workflow attached to your retired issue type.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Tom, you can workaround this by adding a script at the end of createissue-start.jsp file.
<script language="JavaScript" type="text/javascript"> <!-- remSelOpt(document.getElementById('issuetype114011'),document.getElementById('issuetype')); function remSelOpt(inp1, sel1) { len1 = sel1.options.length; for (i=0;i<len1 ;i++ ) { if (sel1.options[i].value == inp1.value) { sel1.options[i] = null; //or //sel1.remove(i); break; } } } --> </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.
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.