Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,553,550
Community Members
 
Community Events
184
Community Groups

Remove comments field on transition

Edited

how to remove comments field on transitionAnnotazione 2019-02-06 140200.png

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);

5 answers

1 accepted

2 votes
Answer accepted
Nadine Schütt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Feb 11, 2019

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. 

Kevin Johnson
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 19, 2019

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

Nadine Schütt
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Oct 21, 2019

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:

  1. Open Behaviours in the Jira Admin Add-ons section and click Add Behaviour.
  2. Click the Fields link on the newly created behaviour.
  3. Choose the workflow you want to hide comments on as the Guide Workflow.
  4. Add Comment as a field and click on Shown to make it hidden.
  5. Add a condition and choose the required Workflow Action you want to hide the comment on. 

I hope it works for you. 

Like # people like this
Kevin Johnson
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 21, 2019

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 ??

@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?

Like # people like this
1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Feb 11, 2019

You will need a script or automation to identify which ones you want rid of and destroy them.

can you make the script?

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.

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> 

 

it doesn't work jira core 8.4.2

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.

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>
0 votes
Grigory Salnikov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Feb 11, 2019

Hi @Stefano Rosario Aruta!

Please, check the similar question and the answers below:

Remove comments on transition

Hope it helps.

Like Grigory Salnikov likes this
Grigory Salnikov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Feb 11, 2019

Is not what you want?

i want remove the field comment on the screen when i do a transiction

Like Grigory Salnikov likes this
Grigory Salnikov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Feb 11, 2019

I see. Check the similar question:

Hide "Comment" field on transition screens

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events