Add custom field to CSV, Excel export

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
jtf
Posts: 9
Joined: 13 May 2014, 16:23

Add custom field to CSV, Excel export

Post by jtf »

I have added several custom fields and I would like to import them from a CSV file.

Some of those fields have multiple words such as "Vendor Response" or "Admin Comment".

I tried to add them in the "Manage Columns" section of admin by adding "custom_vendor_response" and "custom_admin_comment" but it fails on the second word. What is the proper syntax for custom fields with more than one word? It appears that the one word fields are working, such as "custom_module".

Edit - sorry should have put this in the Help section.

Using version MantisBT Core 1.2.17

Thank you,
Jeff
atrol
Site Admin
Posts: 8589
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Add custom field to CSV, Excel export

Post by atrol »

The names are listed in section "All Available Columns" of the "Manage Columns" page
e.g. you should see "custom_vendor response"
Please use Search before posting and read the Manual
jtf
Posts: 9
Joined: 13 May 2014, 16:23

Re: Add custom field to CSV, Excel export

Post by jtf »

Ahh thank you. Not only was it with no underscore, but it had a leading capital letter.

custom_Module, custom_Defect Version, custom_Build Date, custom_GRT Comment, custom_GRT Final Status,

etc...
jtf
Posts: 9
Joined: 13 May 2014, 16:23

Re: Add custom field to CSV, Excel export

Post by jtf »

Actually, that didn't work. I added the columns and then downloaded the CSV and there was no change - none of my custom columns showed in the CSV.

Here is what I had in the CSV section:

id, project_id, reporter_id, handler_id, priority, severity, reproducibility, version, category_id, date_submitted, view_state, last_updated, summary, status, resolution, fixed_in_version, custom_Defect Version, custom_Agate Response, custom_Agate Status, custom_Agate Current Status, custom_Build Date, custom_GRT Comment, custom_GRT Final Status

I saved it "Update columns as global default for all projects" and it said it was successful. But when I go back to this page to view the columns, the custom columns are gone.
atrol
Site Admin
Posts: 8589
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Add custom field to CSV, Excel export

Post by atrol »

Maybe you didn't choose "All Projects" in the project selection box.
The UI is a bit confusing at this place.
Please use Search before posting and read the Manual
jtf
Posts: 9
Joined: 13 May 2014, 16:23

Re: Add custom field to CSV, Excel export

Post by jtf »

"All Projects" is the only option I have there.

I'm supposed to edit the "CSV Columns" section, ensure "All Projects" is set below and then click "Update Columns as Global Defaults for All Projects"?

That is what I am doing and the custom columns disappear.

In fact, nothing I do on the "Manage Columns" page is saved. I erased "fixed_in_version" which is not a custom column and when I clicked the "Update Columns..." button, that field was back in the CSV columns section where I had deleted it.
jtf
Posts: 9
Joined: 13 May 2014, 16:23

Re: Add custom field to CSV, Excel export

Post by jtf »

So I was able to get the columns added to the CSV by doing it in the "Configuration Report" page (/adm_config_report.php), not on the "Manage Columns" page (manage_config_columns_page.php).

Is that the correct way/place to do it?
Post Reply