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

Comparison seems to wrap text file too much #281

Open
Curly1890 opened this issue Nov 4, 2024 · 18 comments
Open

Comparison seems to wrap text file too much #281

Curly1890 opened this issue Nov 4, 2024 · 18 comments

Comments

@Curly1890
Copy link

Curly1890 commented Nov 4, 2024

Hi
I am doing a comparison to try and see what our systems are vs the baselines.

When i do the comparison as one item, it shows up fine, in the Visual output , but i need to do a bulk compare.
This shows the data split across multiple lines which makes is pretty much impossible to read.

It almost like its adding line breaks, where there is no line breaks, this appears in the csv file and makes it difficult to read when viewed in excel, as i have 10 rows of items like "apps" where they should be all compared in one row.

Im using intune objects with exported files (name) -- but to be honest this appears in all comparisons.
Whether i do comparison type as property or documentation it doesnt matter either.
is it replacing quotes with line breaks?

Here is a screenshot of the issue in the CSV files.

image

@Micke-K
Copy link
Owner

Micke-K commented Nov 9, 2024

Hello,

Thank you for reporting this. Can you try these updates? You will now have the option to set delimiter for multi-value properties

You also have the option to export compare result to a json file for further automation.

Extract zip and replace existing files and restart the app.

Let me know how it goes.

Cheers!

Extensions.zip

@Curly1890
Copy link
Author

Hey
This zip file is empty?
Once i get that ill give it a test and make sure its all working now!

@Micke-K
Copy link
Owner

Micke-K commented Nov 13, 2024

Well, that is a bit embarrassing :)

Try this one...

Cheers!

Extensions.zip

@Curly1890
Copy link
Author

Curly1890 commented Nov 13, 2024

Thanks
I have tested this today, and its still doing the same thing.
I have edited the multi-value delimiter to both pipe, semicolon and new line.
when I then compare each csv output they are saying they are exactly the same - so the Multi-line property selection isn't reflecting in the output.

I can confirm the files in the extension are definitely different, but looking at the code, this is more around JSON than the actual csv output.

@Curly1890
Copy link
Author

It would also be great if we could chose the output file save location - i couldnt see that option in the code otherwise id have tried to add that

@Micke-K
Copy link
Owner

Micke-K commented Nov 13, 2024

This is what I got when I compared an Administrative Template policy via Bulk Compare. I used the pipe. Both the csv and json file reflects the selected Multi-property character.

The Document.psm1 file is updated. Additional arguments were added to the Invoke-ObjectDocumentation that defines what character to use in multi-value properties.
This Compare.psm1 file was updated to call Invoke-ObjectDocumentation with the selected character.

Not sure why that is not reflected in your output. Stupid question...did you restart it after you copied the psm1 files to the Extension folder?

I'll see if I can add output file for both csv and json at some point.

Cheers!

image

image

image

@Curly1890
Copy link
Author

Hey
been doing some more testing and the items still appear as follows when compared in bulk..
image

When you compare one item at a time - it still shows fine in the GUI output.
image
but it seems to do it fairly consistently
I'm using the openbaselines as they are extracted with this tool, on a dev tenant.

These are the settings i chose
image
The objectname always seems empty too!

Also - brand new install of the tool, and copied the extensions over to it. :)

@Micke-K
Copy link
Owner

Micke-K commented Nov 13, 2024

Found it...I hope.

The Compare did some part of the CSV with a new line. I replaced them it now works for me with Compliance policies.

Let me know how it goes.

Cheers!

Compare.zip

@Curly1890
Copy link
Author

Thanks
This is nearly there i think

Just found one more line which is running over another bitlocker one

image

This is simple enough for me to edit the csv, if we can't get that one fixed for the time being though
Very grateful for you time on this.

@Micke-K
Copy link
Owner

Micke-K commented Nov 14, 2024

Hello,

I had a quick look. There's something wrong in how that specific setting is being documented. This causes a new line in the output somehow.

I'll try to gave a look at this on the weekend.

Cheers!

@Curly1890
Copy link
Author

Thanks again!
I also seem to be getting the Policy names 3 times, twice in the comparison then later on somewhere..

image
They have already been compared- and then suddenly just get added again later on

appreciate your help and time on this.

@Micke-K
Copy link
Owner

Micke-K commented Nov 15, 2024

Hello,

That normally happens when there are policies missing in either source or the destination of the compare.

Try excluding missing policies and see if they disappear.

Cheers!

@Curly1890
Copy link
Author

Those policies are already compared.
They match but then some how get listed below..
Seems very strange, but ill try it on the old version without our custom one, and see if we are introducing some bugs!
I thought the same, but they are definitely there and match

@Micke-K
Copy link
Owner

Micke-K commented Nov 16, 2024

Hello,

Issue 1: Should be fixed with the Document.psm1 in the attached file. Microsoft actually had two new lines in the setting name. Weird! I trimmed these out from the string.

Issue 2: Bug in the 'Intune Objects with Exported Files (Name)' provider. It added files even if they were compared previously with an Intune policy.

Cheers!

Compare.zip

@Curly1890
Copy link
Author

It looks like we need to review the output JSON as well!
Someone had saved the description and pressed enter at the end of the line - so it appears like this
image

With a new line after the description :(
I think this will fix everything in the last few issues I'm seeing here now.
Thank you for all your efforts on this

@Curly1890
Copy link
Author

Yes that's fixed it

You also have to export - edit the code, then reimport, to get rid of the /n in the description, once its there no editing (delete etc) will get rid of it.

@Micke-K
Copy link
Owner

Micke-K commented Nov 19, 2024

Hello,

Try this. It will trim new line from the description string, Both '\r\n" and "\n".

However, I would expect there to be descriptions with intended multiline. This would not fix them.

Cheers!

Documentation.zip

@Curly1890
Copy link
Author

Hey
Sorry for delays in checking this, I am not sure we are really getting to the bottom of it, ill spend some time doing a thorough review, as it seems like documentation comparison now just lists the names, while property comparison, lists everything on different lines again.

will feedback shortly, if not in the new year after the holidays

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

No branches or pull requests

2 participants