Export component's as separate columns

Dave Teale July 6, 2016

Hi,

We currently use components to capture some of the following information for an issue:

  • Affected customer project id, e.g. P1234
  • Affected application

Among others. Each might have multiple values so we find components is the easiest way to deal with these, especially for filters and searching.

Except when it comes to exporting.

We use export to excel to report to the customer but we have to manually separate out the project id into a new column so it can be consumed on their side easily.

Is there a custom field type we can create that otherwise acts the same way as component's so that the project id and component's export separately?

 

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
July 6, 2016

No.  I don't think there's really a useful way to do this even with code.

The component is a single field which may have multiple options selected.  A column in excel is a field.  So if you select three components, it puts all three values into that one column.  It's not accurate to separate them out.

The closest I can get is to use the Script Runner to create a number of scripted fields which will each contain only one of the components - you can leave these off all the screens, so they only get used in the issue navigator and hence get downloaded to excel.

There's also two ways to approach it:

  1. Sequential columns - c1 would contain the first component, c2 the second, c3 the third and so-on, assuming the content of the component field is sorted (maybe by component name).  This won't really work for the end users well because any given component selected could end up in different columns
  2. One per component option - if your project has 10 components, you'd need 10 fields.

In both cases, you've made a new headache in maintenance, as you'll need to think about new fields and re-indexing every time someone adds a component option.  And re-indexing the project if someone changes the name of a component.

Suggest an answer

Log in or Sign up to answer