Hello,
I want to show/hide some fields depending on some conditions on a transition screen.
The transition screen has the name i.e. "A" the view/edit screen which is connected to the project of the transition is called "B - view/edit".
I tried the following code to check if I am on the transition screen at the moment (because the fields are also on the view/edit screen, where they always should be shown) (The code is located on one field of the transition and view/edit screen)
import com.atlassian.jira.issue.fields.screen.FieldScreenManager
import com.atlassian.jira.issue.fields.screen.FieldScreen
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.user.ApplicationUser
String currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser().getName()
if (getFieldScreen().name == "A")
{
}
With the log info I've checked the value of getFieldScreen().name, it is always "B - view/edit", even if I am at the transition screen :-(
Can anyone explain me how to chek why this check fails? Or what shoul I check to get the current screen? (transition screen)
I work with JIRA 7.1.2.
Thanks and kind regards
Katrin