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

Fixed Notes field doesn't get populate when creating/updating assets via Importer [sc-23222] #12975

Merged
merged 1 commit into from
May 8, 2023

Conversation

inietov
Copy link
Collaborator

@inietov inietov commented May 4, 2023

Description

A long time ago, in a galaxy far far away... sorry, today is Starwars day. But yeah, some time ago we decided to separate Asset Notes from Model Notes, before that we only have one general Notes field, but this caused that every time a user populate that field the Asset notes field and the Model notes field get duplicated (more details in #10735).

I think that separation got lost in the Great Importer Livewirefication, because the backend expects that column mapping, but they aren't in the Livewire columns. So this PR just put those columns back.

Fixes [sc-23222]

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Test Configuration:

  • PHP version: 8.2
  • MySQL version: 8.0.32
  • Webserver version: PHP Dev Server
  • OS version: Debian 11

@inietov inietov requested review from uberbrady and snipe May 4, 2023 22:25
@shortcut-integration
Copy link

@what-the-diff
Copy link

what-the-diff bot commented May 4, 2023

PR Summary

  • Removed notes from accessories array
    Cleaned up and simplified code by removing unnecessary notes from accessories.

  • Added notes to assets and consumables arrays
    Enhanced functionality by including notes in the assets and consumables for better data organization.

  • Updated 'notes' key in users array
    Improved clarity by changing the 'notes' key value from an empty string to "Notes" in the users array.

  • Added 'notes' key/value pair in locations array
    Added the ability to store notes in locations, enhancing data management and organization.

@snipe
Copy link
Owner

snipe commented May 5, 2023

@uberbrady I might well be misunderstanding how this is supposed to work, but shouldn't leaving notes in the "everything" array be better? I thought the whole point was to keep repeated things that everything would have in that generic array, and then each specific object gets its own for whatever uncommon fields they have?

@inietov
Copy link
Collaborator Author

inietov commented May 5, 2023

Not uberbrady, but the thing is that for Assets we need the Asset Notes and Model Notes, and if we add the Notes field that can be more confusing since it wouldn't have any effect. Is there a way to put the Notes field in the general array and then not showing it for imports of type Assets?

@snipe snipe merged commit d685335 into snipe:develop May 8, 2023
4 checks passed
@snipe snipe mentioned this pull request May 10, 2023
2 tasks
@mirktmirkt
Copy link

mirktmirkt commented May 15, 2023

@szecsib
Copy link

szecsib commented Jun 13, 2023

HI SnipeIT team,

We have the same issue with Version v6.1.1-pre - build 10778 (master).
I'm used dockerhub to deploy this version to our docker environment. I tried to overwrite the app/Http/Livewire/Importer.php with this fix but it's still missing the Asset notes after the import process. Could you give us feedback or other method to import the asset notes? Is it possible the fix is ready in developer branch but it's not in the docker version of the app?

BR,
Balazs

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

Successfully merging this pull request may close these issues.

None yet

4 participants