Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Export custom forms field in csv, pdf for attendee #7444

Merged
merged 2 commits into from
Nov 14, 2020

Conversation

codedsun
Copy link
Contributor

@codedsun codedsun commented Nov 13, 2020

Fixes fossasia/open-event-frontend#4615

Short description of what this resolves:

Exported custom forms field in csv, pdf for attendee

Changes proposed in this pull request:

Checklist

  • I have read the Contribution & Best practices Guide and my PR follows them.
  • My branch is up-to-date with the Upstream development branch.
  • The unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • All the functions created/modified in this PR contain relevant docstrings.

<td><br>
{% for field in custom_forms %}
{% if field.is_complex %}-->
{{ holder.complex_field_values | attr(field.field_identifier) }} {{ holder.complex_field_values | attr(field.field_identifier) }} <br>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iamareebjamal - Need your help here, how do I apply a condition when the attribute is not present.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if field.is_complex and holder.complex_field_values

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Like an arrows are developing here I want this to be ''

Copy link
Member

@iamareebjamal iamareebjamal Nov 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove --> from template

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

O my eyes 👀

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iamareebjamal - Still the values are not fetched by holder.complex_field_values | attr(field.field_identifier) will check this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@codedsun
Copy link
Contributor Author

@iamareebjamal Tested! Shall I provide you the csv and pdf?

@iamareebjamal
Copy link
Member

Yes, and update the screenshots

@iamareebjamal
Copy link
Member

And fix the build

@codedsun
Copy link
Contributor Author

CSV
image

PDF
image

@iamareebjamal
Copy link
Member

Which one is custom among the fields?

@codedsun
Copy link
Contributor Author

Which one is custom among the fields?

Github Link, Mobile

Can be seen on last 2nd order

@codedsun
Copy link
Contributor Author

image

Last 2nd order in pdf.

@codedsun
Copy link
Contributor Author

@iamareebjamal Review!

@codecov
Copy link

codecov bot commented Nov 13, 2020

Codecov Report

Merging #7444 (dc201dd) into development (ea8a477) will increase coverage by 0.00%.
The diff coverage is 68.75%.

Impacted file tree graph

@@             Coverage Diff              @@
##           development    #7444   +/-   ##
============================================
  Coverage        65.28%   65.28%           
============================================
  Files              265      265           
  Lines            13223    13237   +14     
============================================
+ Hits              8632     8642   +10     
- Misses            4591     4595    +4     
Impacted Files Coverage Δ
app/api/helpers/tasks.py 16.87% <25.00%> (+0.12%) ⬆️
app/api/helpers/csv_jobs_util.py 87.34% <75.00%> (-1.55%) ⬇️
app/models/custom_form.py 98.07% <100.00%> (+0.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea8a477...dc201dd. Read the comment docs.

@iamareebjamal iamareebjamal changed the title Exported custom forms field in csv, pdf for attendee feat: Export custom forms field in csv, pdf for attendee Nov 14, 2020
@auto-label auto-label bot added the feature label Nov 14, 2020
@iamareebjamal iamareebjamal merged commit a83c8a2 into fossasia:development Nov 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Forms: Store all data, Prevent data loss in altered forms and export all forms data in the relevant CSVs
2 participants