Reputation: 81
I'm wondering if theres a possibility to add a Custom Field (A Textfield for ex.) to the Create Issue Screen (Default Screen). I already managed this by using the Web-GUI, but now i want to do this with a plugin.
Upvotes: 2
Views: 873
Reputation: 3958
Here's how to add existing custom field to existing screen from your plugin code:
FieldScreenManager fieldScreenManager = ComponentAccessor.getFieldScreenManager();
FieldScreen screen = fieldScreenManager.getFieldScreen(screenID);
FieldScreenTab defaultTab = screen.getTab(0);
defaultTab.addFieldScreenLayoutItem(customFieldID);
Check FieldScreenManager and FieldScreen javadocs for detailed info.
Upvotes: 1