We need to upgrade jira from 4.1.2 to 7.3.0 version and we've found a bug on report configuration screen, concerning cascadinselect configuration object. We have several reports with 2 select boxes in cascade :
<properties>
<property>
<key>projectid</key>
<name>Projects Names</name>
<description>SELECTION of Project</description>
<type>select</type>
<values class="com.eri.jira.reports.ProjectValuesGeneratorEriWithoutAll" />
</property>
<property>
<key>componentid</key>
<name>Project Components</name>
<description>SELECTION of Project Component</description>
<type>cascadingselect</type>
<values class="com.eri.jira.reports.ComponentsForSpecificProjectGeneratorEri" />
<cascade-from>projectid</cascade-from>
</property>
After installation of our plugin to generate client reports, the screen of report configuration show us the list of projects in select box Projects Names, but nothing or hidde select box in ProjectComponents select box. See attachment1.png.
We've done some Google research, and we found issue JRASERVER-22613 where cascadingutil.js is mentioned. After vérification this file not exist in JIRA 7.3.0. We've added and including it on system-webresources-plugin.xml but it doesn't change: cascadind selet doesn't work.
Inside Atlassian Community we've found a lot of issues concerning this bug but no solution yet.
The classes involved in jira report and atlassian-plugin.xml are:
import java.util.Map;
import org.apache.commons.collections.map.ListOrderedMap;
import com.atlassian.configurable.ValuesGenerator;
import atlassian.jira.portal.ProjectValuesGenerator;
public class ProjectValuesGeneratorEriWithoutAll implements ValuesGenerator{
public Map getValues(Map arg0) {
@SuppressWarnings("unchecked")
ProjectValuesGenerator projectValuesGenerator = new ProjectValuesGenerator();
Map<String, String> values = new ListOrderedMap();
values.putAll(projectValuesGenerator.getValues(arg0));
return values;
}
}
public class ProjectComponentsValuesGenerator implements ValuesGenerator
{
private static final Logger log = Logger.getLogger(ProjectComponentsValuesGenerator.class);
public Map getValues(Map userParams)
{
GenericValue valueProject = (GenericValue)userParams.get("project");
HashMap hashMap = new HashMap(valueProject);
Object detectedProjectId = hashMap.get("id");
ProjectManager projectManager = ComponentAccessor.getProjectManager();
List<Project> projectObjects = projectManager.getProjectObjects();
Map<String, ValueClassHolder> values = new LinkedHashMap<String, ValueClassHolder>();
String key = "";
for (Iterator iterator = projectObjects.iterator(); iterator.hasNext();)
{
Project project = (Project) iterator.next();
Collection<ProjectComponent> components = project.getComponents();
key = project.getId().toString();
values.put(key+"ERI", new ValueClassHolder("All", key));
for(Iterator<ProjectComponent> componentIt = components.iterator(); componentIt.hasNext();)
{
ProjectComponent projectComponent = componentIt.next();
values.put(projectComponent.getId().toString(), new ValueClassHolder(projectComponent.getName(), key));
}
}
return values;
}
}
The bug is detected with IE 11, Firefox 55.0.3 and Chrome 60.0.312.113
Thanks a lot to solve this situation to start migration
You should upgrade Jira Software 7.0 first, before upgrading to Jira Software 7.4
Do you have a reason? We think maybe is a javascript bug on cascading select object configurator that probably it doesn't receive the project selected by the user. The selecte box corresponding to cascading select is hide and there is not trace of user project selection action in the jira log file
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.