I am also facing same problem due to this "+ Create Issue" button in projects sections. This button is creating issue bypassing mandatory fields. We are using Script Runner plugin for the customfield behavior using groovy scripts.
This is a challenge for us, few users created issue using this button by mistake and ended up having no mandatory fields populated.
This project is a "Company Managed project", but if you can let me know how to get this property of project.
We have customized JIRA to accommodate with our requirement of work flow management tool.
We are using "Atlassian Jira Project Management Software"
Please suggest us any work around or any solution to disable this "inline issue creation" block.
Ok let's get clearer on how to correctly determine how to set mandatory fields:
- When you want a field to be mandatory on a whole instance -> Behaviour , or less convenient all fields configurations , or JS in banner (yes it's possible but far from good practice)
- When you want a field to be mandatory in a whole project -> Field configuration
- When you want to make it mandatory on a transition (or in creation) -> validator in workflow
- When you want to make it mandatory depending the value of another field on a single project -> Scriptrunnner's Behaviour (or in the description you can set in the field configuration of the specific project but I REALLY DISCOURAGE THIS)
- When you want to make it mandatory depending the value of another field on a whole instance -> Scriptrunnner's Behaviour only.
Finally on setting default or auto-value on a field:
- If you want a single default value on a system field -> Scriptrunnner's Behaviour only.
- If you want a single default value on a custom field -> Context of the field (best practice) or Scriptrunnner's Behaviour for some use cases like having multiple contexts for the same field on the same project for different issue type (a current limitation of the contexts).
- If you want to automatically change a field value depending on other values -> Scriptrunnner's Behaviour only.
In what case are you currently ?
Hope this help !
There is no reason to do this.
The "create issue" button does not "bypass mandatory fields" unless you've kludged "mandatory" into the system in the wrong way. If you have used the field configuration or a validator to make your fields mandatory, then this "create issue" route will respect that.
If you insist on doing it this way, you also need to look wider than getting rid of this button - the url it pops will still be usable, the REST API is another route, if you've got JSM, requests can bypass it, and there's a couple of incoming email routes.
I don't think removing the create link here is the right thing to do. You should be making the field mandatory in the standard way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As we have different transition screens, to make fields mandatory we have used "Script Runner" plugin. This provides wide range of facility like behavior script and others.
System defined configuration will not suffice all the requirements of field behavior management.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should not be doing mandatory fields with Behaviours. I know it was in there years ago because it was useful, but that was before Adaptavist even got Scriptrunner, and at a time when there was only one way to create or edit issues in the UI. Now you've got lots of ways to do it, Beavhours can't cover them all, and mandatory fields should be done with field configurations or validators.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there any other solution for hiding "+ Create Issue" button apart of changing configuration for all fields.
I have tried one approach of adding JavaScript in announcement banner, but this is not consistent.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No, it's not possible to hide it (reliably).
Changing the configuration of the fields won't hide it, but it will stop your problem of "lets people bypass mandatory fields", which means there's no reason to try to hide the button.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It’s not a good practice and like Nick said you probably have better choice to do rather than hide this.
if you really want to hide this there’s only two choice :
-js in banner
-you can do this with script fragment https://scriptrunner.adaptavist.com/latest/confluence/CustomisingUI.html . You can hide almost everything with this. The documentation is pretty clear about this.
Again like nick said hiding this is probably not the solution of your use case. You can either make the field appear in validator (if you want this to be mandatory on some transition) or in fields configuration if you want to make this available in every status.
Moreover the behaviour should work on this afiak.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
AJS.$(document).ready(function () {
var hideIssueCreateInProjects = function () {
const collection = document.getElementsByClassName("inline-issue-create-container");
for (let i = 0; i < collection.length; i++) {
collection[i].style.display = "none";
}
};
hideIssueCreateInProjects();
});
3. There is no fragment found for "+ Create Issue" using Fragment locator. Below is the screenshot.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I think you shoud be able to this by two way depending on if you want this to be global.
- By adding JS and condition in banner in AJS you should be able to revove the buttonon a specific project
- Globally you can hide his feature using scriptrunner fragment function https://scriptrunner.adaptavist.com/latest/confluence/CustomisingUI.html
Hope this help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have tried javascript approach in announcement banner but it's behaving inconsistently, sometimes when I refresh page it again shows up.
If you can let me know which UI element is this "+ Create Issue" in projects section. So that I can try hiding in Fragments.
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.