Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Behaviour not hiding field on first trigger on Dashboard

Some of my users like to transition their issues directly from a dashboard. The transition screens have scriptrunner behaviours that hide the comment field from them as part of the initializer. What I've noticed is that the first time a particular transition screen is displayed - regardless of issue, the other parts of the initializer are run successfully, but hiding the Comment field does not work. Without reloading the page, subsequent calls to the transition screen - again, regardless of issue - produce the desired behaviour. Reloading the page seems to reset the screens and the comment field is not hidden. 

Transitioning from dashboard actions: image.png

First time after reloading:

image.png

Subsequent calls:

image.png

Comment field is hidden correctly.

1 answer

Hi Brian, could you share the script you used to hide the Comment field? I set it in my Behaviours as a server-side script for the Comment field and mine was hidden successfully even when transitioning issues from the Dashboard.

Hi Tye,

 

I'm using this in my behaviour initializer: 

import com.atlassian.jira.component.ComponentAccessor;

def triggerActions = ["Add RCPE Notes"]
log.info("MCR - RCPE Notes Behaviour will${triggerActions.contains(getActionName()) ? " " : " not "}execute for ${getActionName()}")
if( ! triggerActions.contains(getActionName())) return;

def comments = getFieldByName("Comments");
comments.setHidden(true);

Again, it works on the second access of the transition, but not on the first. So it seems like it's not loading the behaviour in time.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

⚡️NEW Group for Confluence Cloud Admins

Calling all Confluence Cloud Admins!  We created a new Community Group to support your unique needs as Confluence admins. This is a group where you can ask questions, access resou...

71 views 2 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you