Skip to content

Conversation

perryr16
Copy link
Contributor

@perryr16 perryr16 commented Dec 12, 2024

Any background context you want to provide?

What's this PR do?

Allows users to upload property and taxlot labels. Incoming values in a csv's "Property Labels" or "Tax Lot Labels" column will be processed and applied as a label. If a label does not exist, one will be created.

Labels are applied to a PropertyView, however during the upload process PropertyStates are created (mapping) several steps before a PropertyView is applied (matching). As a result, the PropertyState has to carry the incoming label information in a new text field PropertyState.incoming_labels until it can be applied to the related PropertyView.

How should this be manually tested?

From the inventory list, export a set of properties to a csv or spreadsheet. Then in a new cycle, upload that exported file, confirm the correct labels are applied.

What are the relevant tickets?

#4789

Screenshots (if appropriate)

@perryr16 perryr16 added the Feature Add this label to new features. This will be reflected in the change log when generated. label Dec 12, 2024
@perryr16 perryr16 marked this pull request as ready for review December 17, 2024 17:44
Copy link
Contributor

@kflemin kflemin left a comment

Choose a reason for hiding this comment

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

@perryr16 This is almost working!

  1. I've noticed that nothing happens with the labels if we are importing data into a cycle that already has data in it (performing a merge). No new labels are created, and the property labels are not added to the properties. Doesn't matter if the existing property had a label already or didn't. It does work as designed in an empty cycle though.
  2. When creating a new label via import (and really any time), can you make the default be "show in list = true" instead of false? It's confusing otherwise.
  3. Can you also remove the first line of the csv inventory export that lists some information about filters? It breaks the subsequent CSV import and is not comprehensive anyway. I think just listing the headers directly will be better.

@perryr16
Copy link
Contributor Author

perryr16 commented Sep 30, 2025

Most recent commits address the following

  • new labels are defaulted to "show in list"
  • labels are created/added during a merge import into a cycle with existing data

Outstanding issue / edge case

  • incoming states flagged as duplicate will not have their labels processed. This is usually not an issue, however if a label is deleted from the existing property or organization, a new label will not be applied because the incoming state is recognized as a duplicate and is ignored. A fix that will not influence import speed will require further development.
  • To recreate: import file with new label. Delete label. Reimport file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Add this label to new features. This will be reflected in the change log when generated.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants