I want to hide/show screen tabs based on statuses. I am new to groovy and behaviors in scriptrunner.
I have 3 tabs on a screen: Tab A, Tab B, Tab C. I want to show Tab A on first three Statuses, hiding Tab B and Tab C. Then show Tab B on the next 3 Statuses, hiding Tab A and Tab C and so on.
I am trying to run the below script in Initializer section under a behavior.
hideTab(1)
hideTab(2)
if (underlyingissue.getStatus(). getName() == "Status A" || "Status B" || "Status C") {
hideTab(0)
showTab(1)
hideTab(2) }
And so on.
I want help with a script where I can hide tabs for multiple statuses and then show the same tab on other statuses. Please guide me further. Thanks
Your Initializer should run when the form gets loaded. What you are trying to achieve happens during the issue transition from one status to another.
Your behaviour should apply under a field. Do you have a field that should meet a certain condition so that your code goes underneath and that's where you can specify the statuses.
Do you get my point?
Best,
Fadoua
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.