Hi,
I'm developing a simple Menu for Project and want to get the project Id of that selected project.
But i'm stuck at
jiraHelper.getProjectObject()
return null everytime.
@Override public Map getContextMap(User user, JiraHelper jiraHelper) { Map contextMap = new HashMap(); try { Project p = jiraHelper.getProjectObject(); contextMap.put("ProjectId", p.getId()); contextMap.put("ProjectName", p.getName()); } catch (NullPointerException npe) { contextMap.put("ProjectId", "NPE"); contextMap.put("ProjectName", "NPE"); } return contextMap; }
I saw in javadoc said it can be null, but what is a correct way to get this simple info?
Thanks and best regards,
Community moderators have prevented the ability to post new answers.
I can not get "atl.jira.proj.config" working. I'm using Jira 6.4 sdk. Add something like this: <web-section key="my-custom-group-of-tabs-section" ... location="atl.jira.proj.config" ...> ... </web-section> in atlassian-plugin.xml have no use. Any idea?
It should be non null for Project Configuration Web fragment: https://developer.atlassian.com/jiradev/jira-architecture/web-fragments/project-configuration-locations
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.