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

Imported images not showing in ADO work item (image using Jira API URL) #780

Closed
GaryHutson opened this issue May 26, 2023 · 23 comments · Fixed by #918
Closed

Imported images not showing in ADO work item (image using Jira API URL) #780

GaryHutson opened this issue May 26, 2023 · 23 comments · Fixed by #918
Assignees
Labels
bug Something isn't working

Comments

@GaryHutson
Copy link

Describe the problem
The imported work item in ADO is not showing images inside rich text field like Description. The image outline shows, but the path to the image file is incorrect.

Note that the image as an attachment is uploaded correctly in the import, however inside the rich text elements it does not display due to the incorrect URL e.g. has the image url is formatted with Jira rest API like "/rest/api/3/attachment/content/83611" (while the attachment URL format which is something like "/68a356fa-9439-5105-87e2-2132d2608581/_apis/wit/attachments/3b1d2b86-8f42-5c2a-c036-b17de537b483?fileName=image.jpg")

This was working a week ago, and seems to have stopped working, not sure if there is a change somewhere causing this.

To Reproduce
Steps to reproduce the behavior:

  1. Set up Jira ticket with image in rich text field (see screenshot)
  2. Run the export and import to generate ADO item
  3. View work item in ADO
  4. Rich text Description field does not show image (see screenshot)

Tool version
3.0.129

Attachments

  • migrate-config.txt (original .json wouldn't upload here)
  • jira-export-log.txt
  • wi-import-log.txt

Screenshots
Jira Description field screenshot
Screenshot 2023-05-26 152615 - Jira

ADO Description field screenshot
Screenshot 2023-05-26 163335 - ADO

jira-export-log-230526-151422.txt
wi-import-log-230526-151500.txt
migrate-config.txt

@Alexander-Hjelm Alexander-Hjelm added the bug Something isn't working label May 29, 2023
@Alexander-Hjelm
Copy link
Collaborator

@GaryHutson , try the previous release to go around this issue

@GaryHutson
Copy link
Author

@Alexander-Hjelm - thanks for getting back; to confirm I was on v3.0.115 when the issued first appeared (Note: it had been working okay before with v3.0.115) - so then I upgraded to latest v3.0.129 to see if that fixed it - but the issue remained.

I'll double check on v3.0.115 and get back.

@GaryHutson
Copy link
Author

@Alexander-Hjelm - yes it is not working in v3.0.115 - which is odd.

@Alexander-Hjelm
Copy link
Collaborator

I will see if I can free up some time next week to look into this one. In the meantime, is it possible for you to remediate the issue by backtracking to an earlier release?

@GaryHutson
Copy link
Author

Hi @Alexander-Hjelm - I have tried v3.0.78 and v3.0.109
I still have the image url problem on each of those versions.

@Alexander-Hjelm
Copy link
Collaborator

Ok! Will look into the issue this week.

@Alexander-Hjelm
Copy link
Collaborator

Alexander-Hjelm commented Jun 8, 2023

@GaryHutson I fixed the issue so that the images are showing correctly, at least on my end.

Is it possbile for you to verify the fix? Or should I make a release for you to try out?

PR: #785

@GaryHutson
Copy link
Author

@Alexander-Hjelm - can you make a release for me to try?
Thanks

@Alexander-Hjelm
Copy link
Collaborator

Absolutely, I will create a prerelease today :)

@Alexander-Hjelm
Copy link
Collaborator

Release.zip

@GaryHutson Here is a preview with the fix applied. Try it and let me know if it fixes your issue

@GaryHutson
Copy link
Author

Hi @Alexander-Hjelm - the contents of Release.zip are different from normal releases, e.g. there is no jira-export.exe file - I'm not sure how to run this

@Alexander-Hjelm
Copy link
Collaborator

Just take the wi-import.exe and run that instead of your old one :)

@GaryHutson
Copy link
Author

@Alexander-Hjelm - sorry it didn't work for me; I just copied the wi-import application from the Releases.zip and replaced the one in jira-azuredevops-migrator-3.0.129

Ran export, and then import and same results for me with the Jira rest API url not being replaced.

@Alexander-Hjelm
Copy link
Collaborator

Could you please attach the image link as it is generated in your comment on the ADO side?

// Alexander

@GaryHutson
Copy link
Author

This is an image in Rich Text Description field (not a Comment): the image path is
https://dev.azure.com/rest/api/3/attachment/content/73826

@Alexander-Hjelm
Copy link
Collaborator

Release.zip

@GaryHutson Try this release instead, in the same manner as before

@GaryHutson
Copy link
Author

@Alexander-Hjelm - sorry same result: ADO image link in this format: https://dev.azure.com/rest/api/3/attachment/content/73900

@Alexander-Hjelm
Copy link
Collaborator

Strange. My latest fix has at least resolved a very similar issue for another client, so I will proceed and make a new feature release.

Just in case that something is wrong with my .zip, I will notify you once the release is ready! And you can proceed to try using that

@Alexander-Hjelm
Copy link
Collaborator

@GaryHutson try v3.0.136, it should be up in a minute

@GaryHutson
Copy link
Author

@Alexander-Hjelm - thanks. Partial success for me. Not sure what changed from the experiment above but most of the images are working again.

However I have one field where the Jira API is not replaced - it is a custom Jira field on our end configured to populate the Acceptance Criteria - see image....
image

The image URL is https://dev.azure.com/rest/api/3/attachment/content/73651

The config for that custom field:

  {
           "source": "Acceptance Criteria (Rio)",
            "target": "Microsoft.VSTS.Common.AcceptanceCriteria",
	"source-type": "name",
	"mapper": "MapRendered"
  },

@Alexander-Hjelm
Copy link
Collaborator

Ok, that's strange. Will have to take a look at what causes image links to not map for custom fields. But glad that at least comments are working now. Feels like a step in the right direction.

@Alexander-Hjelm
Copy link
Collaborator

Issue closed with merge of PR #918, please reopen the issue and tag me if the problem persists.

@Alexander-Hjelm Alexander-Hjelm self-assigned this Jan 2, 2024
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

Successfully merging a pull request may close this issue.

2 participants