-
Notifications
You must be signed in to change notification settings - Fork 11
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
An extra CR is added to CSV during export on Windows #145
Comments
Are you importing between a Jira DC and Jira Cloud? One of the issues I'm aware of that would cause this, is the difference between Markup and Markdown. I believe DC uses a variant of Markup while Cloud uses Markdown but I would require additional context here about the type of Jira environment to expand on that issue. |
Import from Jira Server 8 to Jira Data Center 10. |
@princenyeche Like this: |
I was able to fix this by editing the code in reporting.py As described here:
|
@kalupator The script actually has this solved by default. SLOC 7897 - 7904 is the condition that is used (as shown in your image). So there was no actual need to edit the code and add additional conditions, as that would cause more problems when performing attachment transfers. You have to look into how you call the arguments for the extraction you're performing which triggers the extra CRs on window devices. |
Can you clarify what arguments you are talking about?
But additional CRs still appear (they disappeared only after adding the line highlighted in red on my screenshot). |
Hmm, that's strange as you should only get to that point in the code if your system is not Windows and you want to open a non-text file. else open(
file,
mode,
encoding=encoding,
errors=errors,
) Should only be reached if you are not on Windows or if you're on Windows and the mode argument is file. Your script is basic enough, so probably did you modify the |
I output the values of the variables (system and mark) in file_writer function on clear installation of jiraone-0.8.6 and got the following result:
I didn't correct the source code in any other way.
Tell me what I can diagnose or send you something else? |
That first one from line is expected, so you shouldn't be changing that. It doesn't affect how the file should work because the content being received is actually in bytes. I think for most of it, the export based on the output you've shown did you still get the CRs added or was it not there? If it's still there based on current ver 0.8.6 can you try something, can you change this line at your end for |
When setting the mode = "wb+", an error occurs:
|
That validates that's not the issue. This is the closest similarity I've seen about this issue JRACLOUD-67140. For the most part, most people who use |
But I understand correctly that this block of code should not be executed in my case at all? I tried changing the locale, country and regional settings of Windows - it hasn't helped yet. |
The problem here is that it's defaulting to that line when using
This brings me to the second factor, which is the constant rewrites that are happening, if CR is added at the first instance when the file is created, this should have been resolved midflight during rewrites which don't happen in your case whereas other Windows user it works. While adding that line helps you, it might cause other issues which is unknown to me. Anyway, if it works for you then I have no complaints. |
I'm already interested in getting to the bottom of the truth. |
Yeah, that's what the rewrites should have done, but it seems this doesn't just happen in your case. I can't provide any answers to that but I guess that's a much easier workaround to just ctrl + s on a notepad prior to using it. |
@princenyeche |
Hello!
In the prepared jiraone csv files there are all line breaks (in fields such as Description).
But when loading the file into a new jira, the line breaks are lost and the field becomes single-line. Because of this, the formatting is lost.
I would like to know if this is possibly affected by some settings when preparing the export file in jiraone or something else?
Thanks!
If I manually return all line breaks, then the formatting returns. But this is very labor-intensive if there are thousands of tasks.
The text was updated successfully, but these errors were encountered: