JIRA Report (Next and Cancel buttons)

Hello All

When we create a custom report I see that "Cancel" button always shows up, but next button shows up some times and some times it does not.

Looks like if one of the fields in the input parameters for the Report is empty (Next) button does not show up. Is this expected behavior.

Please let me know.



6 answers

1 vote
Andy Nguyen Atlassian Team Jan 06, 2014

Hi Abe,

The xml file looks file so I think the issue lies in your Java code. Can you please confirm whether all your projects have at least 1 version or may not have a version? As I can see from the code, you have a condition to check whether "project is null" but do not have a similar condition to check for versions. Would you please verify this?



0 votes
Andy Nguyen Atlassian Team Dec 31, 2013

Hi Abe,

Would you please provide a screenshot of the report configuration page and indicate the version of JIRA you're using?



Happy New Year Andy and to all friends in this forum.

JIRA Version: 6.0.2

Next Button present since Versions are present in this project

Next button not present, since versions are not present in this project

If I add a version to this project, then next button shows up.

For me even if versions are not there I would like next button to be shown so that I can build report with remaining conditions (Ex: A filter may be chosen). If a filter is chosen I will ignore rest. If filter is not chosen I will build report based on available selections for this project.

0 votes
Andy Nguyen Atlassian Team Jan 02, 2014

Hi Abe,

Did you create this report yourself or import it as a plug-in? In either case, I think there must be a constraint that requires a version to be available before you can release the report. If you're able to edit the report please check this carefully otherwise kinldy contact the provider for further help.

All the best,


Here is the report component in atlassian-plugin.xml

<report key="project-report" name="Summary Report" class="com.ting.myreports.ProjectSummaryReport">
		<description key="my.report.description" />
		<label key="my.report.label" />
		<resource type="velocity" name="view" location="templates/charting/myproject-report.vm" />
		<resource type="velocity" name="error" location="templates/charting/myproject-error.vm" />
		<!-- the properties of this report which the user must select before running it -->
				<name>Select Filter</name>
				<description> Version for which you would like to generate the	Report.	</description>
				<values	class="com.ting.myreports.values.VersionValuesGenerator" />
				<name>Start Date</name>
				<description>To find issues created on or after this date</description>
				<name>End Date</name>
				<description>To find issues created on or before this date</description>



Hello Andy

This is a plugin I am writing. Not sure where is the constriant which does not let me show next button..

Here is the code:

import java.util.Collections;
import java.util.Comparator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import org.ofbiz.core.entity.GenericValue;

import com.atlassian.configurable.ValuesGenerator;
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.project.version.Version;
import com.atlassian.jira.project.version.VersionManager;

public class VersionValuesGenerator implements ValuesGenerator  {

	public Map getValues(Map userParams) {
		Map<String, String> versionMap = new LinkedHashMap<String, String>();
        // Get currently selected project
        GenericValue project = (GenericValue) userParams.get("project");
        if (project == null) {
        	AllProjectValuesGenerator.log.debug("VersionValuesGenerator: project is null.");
            return versionMap;
        Long projectId = new Long(project.getOriginalDbValue("id").toString());
        // Load versions for selected project
        VersionManager versionManager = ComponentAccessor.getVersionManager();
        List<Version> versions = versionManager.getVersions(projectId);
        // Sort versions by sequence number
        Collections.sort(versions, new Comparator<Version>() {
            public int compare(Version version0, Version version1) {
                return version0.getSequence().compareTo(version1.getSequence());
        for (Version version : versions) {
            versionMap.put(version.getId().toString(), version.getName());
        return versionMap;


Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,903 views 19 22
Read article

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