Answers.Body: <p>There is a <a href="https://issues.civicrm.org/jira/browse/CRM-21318" rel="nofollow noreferrer">JIRA issue</a> for this 'oversight' and has been assigned to one of the Fuzion team to work on as part of a community 'pay-back/investment/pay-forward'.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-17T23:37:09.063Z
Answers.Text: Happy for someone else to take it on but i expect we can work on it in next few weeks. Ping me via this ticket, or jira, if we seem to be ignoring it
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-18T17:50:22.540Z
Answers.Text: We very much appreciate this.  I will check back here and JIRA periodically. If I don' t see any activity after a few weeks, I will post a new comment to check in on progress.
Answers.UserDisplayName: vtmosaic
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-17T23:35:52.773Z
Answers.LastActivityDate: 2017-12-17T20:23:32.047Z
Answers.LastEditDate: 2017-12-17T20:23:32.047Z
Answers.UserDisplayName: petednz - fuzion
Body: <p>Website is running 4.7.25 over Drupal.  I was able to replicate this on this demo site, which is running at version 4.7.28, as well: <a href="http://dmaster.demo.civicrm.org/civicrm" rel="nofollow noreferrer">http://dmaster.demo.civicrm.org/civicrm</a> </p>
  
  <p>Here are the steps to take to replicate the issue:</p>
  
  <ol>
  <li>Selected Search Builder</li>
  <li>Set extensive search criteria (like 12 of them)</li>
  <li>Set Select Records: to 'all'</li>
  <li>Select Export Contacts Action</li>
  <li>Search Builder Export Options (Step 2 of 3):</li>
  <li>Select Fields to Export checked</li>
  <li>Used Saved Field Mapping (note that I get the same problem regardless of my choice here)-- there were 17 fields in my map</li>
  <li>All other left at their default</li>
  <li>Clicked Continue</li>
  <li>Select Fields to Export (Step 3 of 3)</li>
  <li>Left at defaults</li>
  <li>Clicked Export</li>
  <li>Opened resulting downloaded csv.</li>
  <li>Columns were NOT as mapped; they seemed to be the fields shown on the search results, rather than what I had in field map.</li>
  </ol>
  
  <p>I have several screen shots, but (sorry) cannot see how to post them here.  </p>
  
  <p>My workaround will be to select Primary Fields (80 fields) in the Export dialog,  and just use the 17 columns I want in the resulting .csv.  But, it would be cleaner/simpler for using in any automated processes if this worked correctly, so I thought I'd submit it if it's truly a bug.  Unless someone here can point me to what I'm doing wrong?</p>
  
  <p>Thanks!</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-17T18:19:47.097Z
Comments.Text: in your testing did this problem only happen with a certain number of fields? or asked the other way round, have you proven the problem does not occur with a small set of fields?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-17T19:12:25.197Z
Comments.Text: Good question, tried some additional scenarios today. I can see that the app exports the mapped fields and the search fields, which makes total sense.   
  
  When I ran it with a lot more than 15 (combined mapped and search fields), only 15 columns came down.
Comments.UserDisplayName: vtmosaic
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-17T20:18:28.150Z
Comments.Text: At the kind suggestion of Coleman Watts on JIRA Issues Queue, I am pasting a link to the JIRA issue I created on this question.  
  
  https://issues.civicrm.org/jira/browse/CRM-21318?filter=-2
  
  (I do now realize I should not have created that issue yet, but what's done is apparently done.  Hope this helps mitigate the problems.)
Comments.UserDisplayName: vtmosaic
Tags: <export><search-builder><field-mapping>
Title: Using Export Contacts from Search Builder w/ Field Mapping, mapped field's columns not exported
ThreadText: # Using Export Contacts from Search Builder w/ Field Mapping, mapped field's columns not exported
  
  (Asked by: username_0 on 2017-10-17)
  
  Website is running 4.7.25 over Drupal. I was able to replicate this on this demo site, which is running at version 4.7.28, as well: <http://dmaster.demo.civicrm.org/civicrm>
  
  Here are the steps to take to replicate the issue:
  
  1. Selected Search Builder
  2. Set extensive search criteria (like 12 of them)
  3. Set Select Records: to 'all'
  4. Select Export Contacts Action
  5. Search Builder Export Options (Step 2 of 3):
  6. Select Fields to Export checked
  7. Used Saved Field Mapping (note that I get the same problem regardless of my choice here)-- there were 17 fields in my map
  8. All other left at their default
  9. Clicked Continue
  10. Select Fields to Export (Step 3 of 3)
  11. Left at defaults
  12. Clicked Export
  13. Opened resulting downloaded csv.
  14. Columns were NOT as mapped; they seemed to be the fields shown on the search results, rather than what I had in field map.
  
  I have several screen shots, but (sorry) cannot see how to post them here.
  
  My workaround will be to select Primary Fields (80 fields) in the Export dialog, and just use the 17 columns I want in the resulting .csv. But, it would be cleaner/simpler for using in any automated processes if this worked correctly, so I thought I'd submit it if it's truly a bug. Unless someone here can point me to what I'm doing wrong?
  
  Thanks!
  
  **Tags:** export, search-builder, field-mapping
  
  > **Comments:**
  > **username_1**: in your testing did this problem only happen with a certain number of fields? or asked the other way round, have you proven the problem does not occur with a small set of fields?  
  > **username_0**: Good question, tried some additional scenarios today. I can see that the app exports the mapped fields and the search fields, which makes total sense.     When I ran it with a lot more than 15 (combined mapped and search fields), only 15 columns came down.  
  > **username_0**: At the kind suggestion of Coleman Watts on JIRA Issues Queue, I am pasting a link to the JIRA issue I created on this question.    https://issues.civicrm.org/jira/browse/CRM-21318?filter=-2  (I do now realize I should not have created that issue yet, but what's done is apparently done.  Hope this helps mitigate the problems.)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-10-17. Score: 1
  
  There is a [JIRA issue](https://issues.civicrm.org/jira/browse/CRM-21318) for this 'oversight' and has been assigned to one of the Fuzion team to work on as part of a community 'pay-back/investment/pay-forward'.
  
  > **Comments:**
  > **username_1**: Happy for someone else to take it on but i expect we can work on it in next few weeks. Ping me via this ticket, or jira, if we seem to be ignoring it  
  > **username_0**: We very much appreciate this.  I will check back here and JIRA periodically. If I don' t see any activity after a few weeks, I will post a new comment to check in on progress.  
  
  ---
  
  