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,560,633
Community Members
 
Community Events
185
Community Groups

Hide system fields using behaviour

Edited
vishal
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.
Mar 25, 2021

Hello Guys,

I need to hide system fields like "Time Tracking", "Linked Issues", "Fix Version/s", "Epic Link" using behaviour. Is it something we can do ? If yes, please suggest.

Thanks

1 answer

1 accepted

0 votes
Answer accepted
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 25, 2021

Yes that's possible.

You can either use the form-base configuration in behavior and select those fields.

Or if you want to access them via scripts, you'll use the getFieldById() method.

There are different ways to identify the field id. I personally like to just examine the page html using the browser developer tools. Open the form with the field you want to hide, right-click on the field and select inspect.

For example, doing that on the fix version, you will see something like this:

2021-03-25 09_14_48-DevTools - projects.qad.com_secure_RapidBoard.jspa_rapidView=1124&quickFilter=73.png

I have highlighted where I found the field ID.

You can also use the form-base configuration, add the field and save, then examine the behaviour rest output:

<baseUrl>/rest/scriptrunner/behaviours/latest/config/<id>

 It will show you the fields you selected and their ids

vishal
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.
Mar 27, 2021

Hey Peter,

That worked like a charm, you saved my day. :)

Thanks a lot !!

vishal
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.
Mar 29, 2021

Hey @Peter-Dave Sheehan ,It worked (Inspect thing) for all other fields correctly & guess where it didn't work, fixVersions field is not getting hidden with it, I tried to hide with both methods getFieldByID() & getFieldByName() but no success, anything that you could think off ?

Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 29, 2021

Any errors in your atlassian-jira.log file when you open your create form and expect the field to be hidden?

It should definitely work with getFieldById('fixVersions')

vishal
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.
Mar 30, 2021 • edited

fixversion.JPGhey @Peter-Dave Sheehan There is no error as such, but somehow its not working. I just noticed that upon clinking inspect, Fix Version field is not showing field ID like yours, for other fields it does show to me as well.

Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Mar 30, 2021

Probably a difference in jira version or version field display configuration difference.

Try this:

In behaviours, add the fixVersion Field and save your behaviour.

2021-03-30 10_15_46-Edit Behaviour_ test.png

Look at the URL

2021-03-30 10_16_59-Edit Behaviour_ test.png

Now, change the plugins/sevlet/scriptrunner/admin/behaviours/edit part of the URL with wih rest/scriptrunner/behaviour/latest/config

2021-03-30 10_18_40-.png

This will show you exactly what your field ID is.

If your script still doesn't work with that id, you'll have to share your full script for debugging.

vishal
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.
Apr 01, 2021 • edited Apr 05, 2021

a

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events