• Community
  • Products
  • Jira
  • Questions
  • How to add the fragments to the new project tab panel and which class to extend for base tab panel class. I want to add a tab in project panel with fragment?

How to add the fragments to the new project tab panel and which class to extend for base tab panel class. I want to add a tab in project panel with fragment?

For Fragment my code is

public class FragmentOne extends AbstractFragment

{

protected static final String TEMPLATE_DIRECTORY_PATH = "templates/fragments/";

public FragmentByAssignee(VelocityTemplatingEngine templatingEngine, JiraAuthenticationContext authenticationContext)

{

super(templatingEngine, authenticationContext);

}

@Override

public String getId() {

return "fragmentByAssignee";

}

@Override

public boolean showFragment(BrowseContext arg0)

{

return true;

}

@Override

protected String getTemplateDirectoryPath() {

return TEMPLATE_DIRECTORY_PATH;

}

@Override

protected Map<String, Object> createVelocityParams(BrowseContext ctx) {

Map<String, Object> createVelocityParams = super.createVelocityParams(ctx);

createVelocityParams.put("user", "Satyendra");

return createVelocityParams;

}

}

For Newprojecttab class it is:

public class Newprojecttab extends AbstractFragmentBasedTabPanel

{

private final FragmentOne fragmentOne;

private final FragmentTwo fragmentTwo;

public IssuesBasedProjectTab(VelocityTemplatingEngine templatingEngine, JiraAuthenticationContext authenticationContext)

{

this.fragmentOne= new FragmentOne(templatingEngine, authenticationContext);

this.fragmentTwo= new FragmentTwo (templatingEngine, authenticationContext);

}

@Override

protected List getLeftColumnFragments(BrowseContext arg0)

{

final List fragments = new ArrayList();

fragments.add(fragmentOne);

return fragments;

}

@Override

protected List getRightColumnFragments(BrowseContext arg0)

{

final List fragments = new ArrayList();

fragments.add(fragmentTwo);

return fragments;

}

public boolean showPanel(BrowseContext ctx)

{

return true;

}

}

Its compiling and build sucessfully, But it is not displaying the tab panel & fragment.

Thanks in advance.

2 answers

This widget could not be displayed.

Any error in the logs? What is the plugin version? I have a similar example in JIRA Development but it works only with version 1 plugins as some of the components are not exposed via osgi.

This widget could not be displayed.

Hi,

Thanks for your advice, I have all ready sorted this out it was due to Plugin Version as explained by one of my senior resource and I have implemented it.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

139 views 2 0
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you