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

Remove contact data fields from poi #3180

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

lunars97
Copy link
Contributor

@lunars97 lunars97 commented Nov 6, 2024

Short description

Remove contact box(email, phone number and website) from the poi. These fields should be managed in the contacts.

Proposed changes

  • Remove contact data from the poi model
  • Remove contact data from the poi form
  • Migration should be created
  • Adjust API so it finds the primary contact of the requested POI and reads those fields from the primary contact
  • Remove contact box from poi form
  • Adjust test data

Side effects

  • none?

Resolved issues

Fixes: #3086


Pull Request Review Guidelines

@lunars97 lunars97 marked this pull request as draft November 6, 2024 14:14
@david-venhoff
Copy link
Member

Thanks!
One more thing that this pr needs to handle is migrating the poi fields website, url and phone number to contacts, so that the information is not lost

@lunars97 lunars97 force-pushed the feature/remove-email-phone-number-website-from-poi branch 2 times, most recently from 8a1c879 to 1919148 Compare November 25, 2024 12:29
@lunars97 lunars97 force-pushed the feature/remove-email-phone-number-website-from-poi branch from 1919148 to b22737a Compare November 28, 2024 22:24
@MizukiTemma
Copy link
Member

We should merge this PR in such a timing that it will be delivered at the same time with (or after) the final release of the contact feature for all users, as this removes the contact fields from POI and they must be then shown as primary contact in the related contact box (which is currently visible only for Service Team and CMS Team).

@lunars97 lunars97 force-pushed the feature/remove-email-phone-number-website-from-poi branch 2 times, most recently from 543cc34 to b4e40b9 Compare November 30, 2024 22:23
@lunars97 lunars97 marked this pull request as ready for review December 1, 2024 18:25
@lunars97 lunars97 requested a review from MizukiTemma December 1, 2024 18:26
Copy link
Member

@MizukiTemma MizukiTemma left a comment

Choose a reason for hiding this comment

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

Thank you for opening a PR 💪 I have some initial suggestions.

@MizukiTemma
Copy link
Member

MizukiTemma commented Dec 4, 2024

@lunars97

The box " Contact details" in the POI form must be removed too. After rebasing, a new box with related contacts (introduced by #3162 ) should appear there. Sorry, this was missing in the issue description 🙏

@lunars97 lunars97 force-pushed the feature/remove-email-phone-number-website-from-poi branch from 1f8ec2b to bc2b37e Compare December 4, 2024 13:56
@lunars97 lunars97 force-pushed the feature/remove-email-phone-number-website-from-poi branch from bc2b37e to 0ef376f Compare December 14, 2024 21:00
@lunars97
Copy link
Contributor Author

@MizukiTemma I am receiving test errors, is it because of the test data, specifically, the poi which should not have contact data anymore? 🤔 When I do pre-commit it does not show any test errors...

@MizukiTemma
Copy link
Member

@lunars97
Sorry 🙈 I overlooked updates in this branch 🙈

Yes, The three fields should be removed from the POIs of the test data too.

@lunars97 lunars97 force-pushed the feature/remove-email-phone-number-website-from-poi branch 2 times, most recently from bd43e82 to 83b6f72 Compare December 20, 2024 11:32
@lunars97 lunars97 requested a review from MizukiTemma December 20, 2024 11:45
Copy link
Member

@MizukiTemma MizukiTemma left a comment

Choose a reason for hiding this comment

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

Thank you so much 😻

Only one suggestion left, which is actually because of the innacurate issue description 🙈 🙏

integreat_cms/api/v3/locations.py Outdated Show resolved Hide resolved
@lunars97 lunars97 force-pushed the feature/remove-email-phone-number-website-from-poi branch from 83b6f72 to 7ba539e Compare December 20, 2024 15:53
Fix test error and api docs for poi

Fix Contact module not found error
@lunars97 lunars97 force-pushed the feature/remove-email-phone-number-website-from-poi branch from 42c52fa to a842f9e Compare January 8, 2025 10:10
Copy link
Contributor

@JoeyStk JoeyStk left a comment

Choose a reason for hiding this comment

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

Thank you very much!
To me this looks very good. I want to double-check the migration in the next days and will do a full review for this PR after :)
For now I have one question: This is maybe for @osmers Is it okay to merge this PR already soon, even before the contact feature is released or should we wait until we merge this until the contact feature is released?
(as a reminder: this PR removes the contact section from pois and adds them to contacts instead)

@JoeyStk JoeyStk self-assigned this Jan 9, 2025
Copy link
Contributor

@JoeyStk JoeyStk left a comment

Choose a reason for hiding this comment

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

Except for my question to @osmers I think this looks good. I'm still a bit unsure about the migration, so maybe we can have someone triple-check the code snippet, but other than that I think this looks good :)

@osmers
Copy link

osmers commented Jan 13, 2025

I'd wait with merging it - unless we can guarantee that the contact function and this PR will be in the same release. Otherwise where would municipalities write down contact details if this is merged and the contact functionality not yet available?

@JoeyStk JoeyStk added the blocked Blocked by external dependency label Jan 13, 2025
@JoeyStk
Copy link
Contributor

JoeyStk commented Jan 13, 2025

Blocked until the release of the contact module

@MizukiTemma
Copy link
Member

Maybe turn this PR into draft to avoid accidental merge?

@MizukiTemma MizukiTemma marked this pull request as draft January 13, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked by external dependency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[2024-11-07] Remove E-mail, phone number and website from POI
5 participants