how to remove comments field on transition
this code it does not work:::::
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.issue.fields.layout.field.FieldLayoutItemImpl.Builder
import com.atlassian.jira.component.ComponentAccessor
def c = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectsByName("comment");
c.setHidden(true);
//issue.getFieldById("Comment").setHidden(true);
Hello @Stefano Rosario Aruta
I had the same issue just last week and solved it with ScriptRunner Behaviours.
Was easy to configure for specific transitions only rather than the whole Jira instance and works well.
if you have the scripts can you please share cause i too wanna hide the comment field from a transition screen but i dont know how to do that or proper scripts to do that
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Kevin Johnson
I am afraid I cannot provide a script since my proposed solution requires the Behaviours plugin. Do you have that and struggle setting up the comments field as hidden on a transition?
Here's a quick introduction:
I hope it works for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
haha i know how it works and i can clearly state a step by step procedure to do it like you did
the problem is there is no proper way to code the scripts part thats the only issue
can you help in that ??
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.
@Nadine Schütt , that feature of ScriptRunner is not available in JIRA Cloud. Is there any other way to hide the comment field in the transition screen?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You will need a script or automation to identify which ones you want rid of and destroy them.
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.
Add to field that exist in screen on that transition: <script type="text/javascript">
if($('#issue-workflow-transition-submit').val() =='Transition name'){
$('div.comment-input').css('display', 'none');
}
</script>
Transition name replace with name of your transition.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Why not just edit the Announcement Banner (System > User Interface > Accouncement Banner) and inject some CSS styles to simply hide the comment input... simple, but effective and no custom fields need to be edited to inject javascript.
For one specific form:
<style type="text/css">
div#edit-issue-dialog div.form-body div.content div.field-group.comment-input {
display: none;
}
</style>
or... for all forms:
<style type="text/css">
div.jira-dialog div.form-body div.content div.field-group.comment-input {
display: none;
}
</style>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi A L. The above code was based on core 7.13, so they probably changed the style rules somewhat for the newer version. That said, the same technique of injecting global CSS styles via the announcement banner should still work.
You will have to use your browser development tools (firebug or chrome dev tools) to inspect the DOM and determine the appropriate selector for the comment field that you wish to hide.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Small change for Jira 8.15 (server)
<style type="text/css">
section#edit-issue-dialog div.form-body div.content div.field-group.comment-input {
display: none;
}
</style>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please, check the similar question and the answers below:
Hope it 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.
Is not what you want?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i want remove the field comment on the screen when i do a transiction
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see. Check the similar question:
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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.