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

MapArray errors to map null/None value #1053

Open
TKallem opened this issue Jun 13, 2024 · 3 comments
Open

MapArray errors to map null/None value #1053

TKallem opened this issue Jun 13, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@TKallem
Copy link

TKallem commented Jun 13, 2024

Describe the problem

I am trying to export Components field for Jira issues. In some issues, the components field value set from a value to null/empty/none in one of the revisions.

However when exporting the Components field, its failing to map the None value and produces the following error.
[E][11:48:36] Error mapping field 'Custom.Components' on item 'DSPUBI-2133'.
[System.ArgumentNullException] System.ArgumentNullException: Value cannot be null.

To Reproduce

Steps to reproduce the behavior:

  1. Create a Jira user story
  2. Set components field to a value and Save
  3. Remove value for components field and Save
  4. Set Components field to a value and Save
  5. Run the export process

Tool version

  • jira-azuredevops-migrator-3.0.422

Attachments

Please attach the following files:

jira-export-log-240613-114833.txt
config-agile.json

Screenshots
Screenshot 2024-06-13 120043
image

@TKallem TKallem changed the title MapArray errors to map null value MapArray errors to map null/None value Jun 13, 2024
@Alexander-Hjelm Alexander-Hjelm added the bug Something isn't working label Jun 13, 2024
@Alexander-Hjelm
Copy link
Collaborator

Something likely is not working as expected with the Array mapper. All of the above repro steps are really helpful in troubleshooting this issue, so thanks for that!

Marking as a bug.

Have you tried to omit the following line in your field map?

"source-type": "name",

@TKallem
Copy link
Author

TKallem commented Jun 19, 2024

Hi @Alexander-Hjelm ,

Haven't tried omitting the source-type but I have commented out a line of code in MapArray method where its checking for null and throwing the exception and added a line to return null. It seems to work fine for me now.

image

Thanks,
Thiru

@Alexander-Hjelm
Copy link
Collaborator

Hum, ok! Good catch. It feels like there might be a deeper underlying issue to this, so we might not want to create a PR with your fix right away.

Have you noticed anything about under what conditions the Array-type field becomes null?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants