I like the "create branch" option, but it is not appropriate in all issue states. There is (in our workflow) no sense in creating a branch for a closed issue, nor for an issue that is not "in progress". We have set some conditions on the transaction from "open" to "in progress", so we cannot use the create branch trigger to move the issue to "in progress".
Is there a possibility to select in which issue states the "create branch" link is visible?
Hello,
Thank you for all your feedback and suggestions about this matter.
As we understand that this would be a useful feature for JIRA, we created the following feature request to get it implemented through JIRA UI:
- Disable "create branch" option depending on issue status
Feel free to vote and watch the suggestion to increase its priority and also receive notifications about any updates.
We hope to have a nice tracking of how many users are requiring this functionality and put some effort to get you with any options to configure it. Thanks!
<script type="text/javascript">
$( document ).ready(function() {
var devtoolsDoms = AJS.$("a.devstatus-cta-link");
if(devtoolsDoms === null || devtoolsDoms === undefined) return;
var createBranchDom = devtoolsDoms[0];
if(createBranchDom === null || createBranchDom === undefined) return;
var issuestatus = createBranchDom.attributes["data-issue-status"];
var isassignee = createBranchDom.attributes["data-is-assignee"];
if(issuestatus === null || issuestatus === undefined) return;
if(isassignee === null || isassignee === undefined) return;
if( (issuestatus.value !== "Todo" && issuestatus.value !== "In Progress" ) || isassignee.value !== "true") createBranchDom.style.display="none";
else createBranchDom.style.display="block";
});
</script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
here is sample js code to hide create branch link if user not assigned or status not valid
<script type="text/javascript">
$( document ).ready(function() {
var devtoolsDoms = AJS.$("a.devstatus-cta-link");
if(devtoolsDoms === null || devtoolsDoms === undefined) return;
var createBranchDom = devtoolsDoms[0];
if(createBranchDom === null || createBranchDom === undefined) return;
var issuestatus = createBranchDom.attributes["data-issue-status"];
var isassignee = createBranchDom.attributes["data-is-assignee"];
if(issuestatus === null || issuestatus === undefined) return;
if(isassignee === null || isassignee === undefined) return;
if( (issuestatus.value !== "Todo" && issuestatus.value !== "In Progress" ) || isassignee.value !== "true") createBranchDom.style.display="none";
else createBranchDom.style.display="block";
});
</script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The syntactically correct version is
if (AJS.$("#status-val").text() == "Closed") { AJS.$("#viewissue-devstatus-panel").hide() }
But in reality, it doesn't work.
It does hide the panel during the initial time while the bug information is refreshing, but at the end the panel is shown back again. Maybe there is another script running after that that rebuilds it.
So it's still unresolved.
We need this capability, but until now, I don't have any better idea how we can do it.
If someone knows, please advice
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can write a javascript which will check the status of the issue and remove the development panel from the UI . something like the below script . Not tested its just to guide you . You will need to paste the script in the announcement banner . Try on a test instance first
if (AJS.$.("#status-val").value=="Closed") { AJS.$.("#viewissue-devstatus-panel").remove() }
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sounds like a promising way forward, but I'd have to learn javascript first to get it to work...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
But this will remove the entire dev panel, is there a way to remove only the "create branch" link?
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.