populate cascading select for report in Jira 5.0.2 + Update the cascading select box

I have to update a plugin from Jira 3.13 to Jira 5. But I cannot find anything in the net.

The first select is given me a list of all projects and the second cascading select shows a list of all available versions. Both list are populated but the cascadingselect das not react on changes on the select.

I think, the cascading list is only pupulated right, due to the toString() method of the ValueClassHolder-class?!?

This all worked on Jira 3.13. Have anyone an idea how to solve my problem?

What I have got is this within the altassian-plugin.xml:

<properties>
	<property>
		<key>filterId</key>
		<name>report.projectsubtaskstatusreport.filterId
		</name>
		<description>report.projectsubtaskstatusreport.filterId.description
		</description>
		<type>select</type>
                <values	class="jira.reports.projectsubtaskstatus.projectpmvaluesgenerator" />
</property> <property> <key>projectVersion</key> <name>report.projectsubtaskstatusreport.projectVersion </name> <description> report.projectsubtaskstatusreport.projectVersion.description </description> <type>cascadingselect</type> <cascade-from>filterId</cascade-from> <values class="jira.reports.projectsubtaskstatus.VersionPMValuesGenerator" /> </property>

and the VersionPMValuesGenerator looks like:

public class VersionPMValuesGenerator implements ValuesGenerator {
	// public class VersionPMValuesGenerator implements ValuesGenerator{

	public Map getValues(Map arg0) {
		VersionManager versionManager = ComponentManager.getInstance().getVersionManager();
		JiraAuthenticationContext jiraAuthenticationContext = ComponentManager.getInstance().getJiraAuthenticationContext();

		Collection<Project> projects = ComponentAccessor.getPermissionManager().getProjectObjects(Permissions.BROWSE,
				ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser());

		Map<String, ValueClassHolder> allVersions = new ListOrderedMap();
		for (Iterator<Project> iterator = projects.iterator(); iterator.hasNext();) {
			Project project = iterator.next();
			Collection<Version> versions = versionManager.getVersions(project);
			for (Iterator<Version> versionIt = versions.iterator(); versionIt.hasNext();) {
				Version version = versionIt.next();
				allVersions.put(version.getId().toString(), new ValueClassHolder(version.getName(), project.getId().toString()));
			}
		}
		return allVersions;
	}

private static class ValueClassHolder {
		private String value;
		private String className;

		public ValueClassHolder(String value, String className) {
			this.value = value;
			this.className = className;
		}

		public String getValue() {
			return value;
		}

		public String getClassName() {
			return className;
		}

		public String toString() {
			return value;
		}


3 answers

This widget could not be displayed.

Rene, I'm having the same issue. Were you ever able to resolve this? Thanks.

This widget could not be displayed.

I am also facing the same problem............

This widget could not be displayed.

Answering for Rene: He never got an answer, the problem is still unresolved.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Thursday in United States

Local Atlassian Research Workshop opportunity on Sep. 28th

We're looking for participants for another workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sh...

46 views 0 0
View post

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