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

fix-9127: Add the unique ticket code into the downlad CSV file #9130

Merged
merged 9 commits into from Mar 21, 2024
Merged

fix-9127: Add the unique ticket code into the downlad CSV file #9130

merged 9 commits into from Mar 21, 2024

Conversation

ghost
Copy link

@ghost ghost commented Mar 19, 2024

Fixes #9127

Short description of what this resolves:

  • Add the unique ticket code into the downlad CSV file

Changes proposed in this pull request:

  • Add the unique ticket code into the downlad CSV file

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.

@@ -12,7 +12,7 @@

# revision identifiers, used by Alembic.
revision = 'bce7acfe5a4f'
down_revision = '24271525a263'
down_revision = '1af4cc4f7cd5'
Copy link
Member

Choose a reason for hiding this comment

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

Why is a database migration necessary here? I don't see any changes to the database structure?

Copy link
Author

Choose a reason for hiding this comment

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

Because we encountered the problem "Error: Multiple moving heads" when running "ci/circleci:test". So I checked and changed the version of this file

Copy link
Member

Choose a reason for hiding this comment

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

Indeed, previous changes introduce a split tree, how did that happen?
Thanks for fixing it

Copy link
Author

Choose a reason for hiding this comment

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

I saw this problem happen 6 months ago and don't know why this problem happened

'Zipcode': str(attendee.order.zipcode) if attendee.order.zipcode else '',
'Email': '',
data = {
'Order#': str(order.get_invoice_number()),
Copy link
Contributor

Choose a reason for hiding this comment

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

order number and not invoice number and line 58 too

Copy link
Author

Choose a reason for hiding this comment

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

Hello @mariobehling, can you share about this idea?

Copy link
Contributor

@cweitat cweitat Mar 20, 2024

Choose a reason for hiding this comment

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

Every order has a relation to tickets and invoice. Each has different number.


{
    "data": {
        "type": "order",
        "attributes": {
            "order-notes": null,
            **"identifier": "ad2ad60f-33f1-456e-9fec-7d0c3151f217",**
            "created-at": "2024-03-20T03:09:04.041344+00:00",
            "tax-business-info": null,
            "exp-month": null,
            "address": null,
            "tickets-pdf-url": "https://api.eventyay.com/generated/tickets/orders/tickets/pdf/ad2ad60f-33f1-456e-9fec-7d0c3151f217/ad2ad60f-33f1-456e-9fec-7d0c3151f217/b1pBQ1dDQ0/ad2ad60f-33f1-456e-9fec-7d0c3151f217.pdf",
            "transaction-id": null,
            "paid-via": null,
            "state": null,
            "company": null,
            "city": null,
            "completed-at": "2024-03-20T03:10:41.185012+00:00",
            "discount-code-id": "71117",
            "amount": 0.0,
            "brand": null,
            "status": "completed",
            "country": null,
            "exp-year": null,
            "last4": null,
            "is-billing-enabled": false,
            "cancel-note": null,
            "zipcode": null,
            "payment-mode": "free"
        },
        "relationships": {
            "marketer": {
                "links": {
                    "self": "/v1/orders/ad2ad60f-33f1-456e-9fec-7d0c3151f217/relationships/marketer"
                }
            },
            "tickets": {
                "links": {
                    "self": "/v1/orders/ad2ad60f-33f1-456e-9fec-7d0c3151f217/relationships/ticket",
                    "related": "/v1/orders/ad2ad60f-33f1-456e-9fec-7d0c3151f217/tickets"
                },
                "data": [
                    {
                        "type": "ticket",
                        "id": "3458"
                    },
                    {
                        "type": "ticket",
                        "id": "3464"
                    }
                ]
            },
            "discount-code": {
                "links": {
                    "self": "/v1/orders/ad2ad60f-33f1-456e-9fec-7d0c3151f217/relationships/discount-code",
                    "related": "/v1/discount-codes/71117"
                }
            },
            "event": {
                "links": {
                    "self": "/v1/orders/ad2ad60f-33f1-456e-9fec-7d0c3151f217/relationships/event",
                    "related": "/v1/events/3284"
                },
                "data": {
                    "type": "event",
                    "id": "3284"
                }
            },
            "user": {
                "links": {
                    "self": "/v1/orders/ad2ad60f-33f1-456e-9fec-7d0c3151f217/relationships/user",
                    "related": "/v1/users/33522"
                }
            },
            "attendees": {
                "links": {
                    "self": "/v1/orders/ad2ad60f-33f1-456e-9fec-7d0c3151f217/relationships/attendee",
                    "related": "/v1/orders/ad2ad60f-33f1-456e-9fec-7d0c3151f217/attendees"
                },
                "data": [
                    {
                        "type": "attendee",
                        "id": "49414"
                    },
                    {
                        "type": "attendee",
                        "id": "49413"
                    }
                ]
            },
            "event-invoice": {
                "links": {
                    "self": "/v1/orders/ad2ad60f-33f1-456e-9fec-7d0c3151f217/relationships/event-invoice/",
                    **"related": "/v1/event-invoices/38205"**
                }
            }
        },

Copy link
Author

@ghost ghost Mar 20, 2024

Choose a reason for hiding this comment

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

image
It means.
The value of "Order#" will be the value of "identifier" in the JSON above, right?
So the value of "Ticket ID" will be the same as "Order#", right?

Based on Mario's comment, "ticket ID" will be the "identifier" of the JSON you provide
#9127 (comment)

@norbusan norbusan merged commit dba3ccb into fossasia:development Mar 21, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the unique ticket code into the downlad CSV file
2 participants