Closed cacti77 closed 2 months ago
The first thing I notice is that the Type map seems to include the Process name. Is this correct? If the Work Item Types are named simply Bug and Improvement, then the type map should look like the following:
"type-map": {
"type": [
{
"source": "Improvement",
"target": "Improvement"
},
{
"source": "Bug",
"target": "Bug"
}
]
},
Thanks @Alexander-Hjelm. Your suggestion was actually what I tried originally. However, even though both the jira-export and wi-import tools ran without error, no work items appeared in my DevOps project! I nearly raised an issue to ask how does one map to custom WITs; I couldn't find anything in the FAQ about this.
But when I went to https://dev.azure.com/MyOrg/MyProject/_apis/wit/workitemtypes?api-version=7.1 to list the WITs in my project I could see my custom WITs were prefixed with the process name; e.g.:
{
"name": "Bug",
"referenceName": "Myprocess.Bug",
and when I updated my type-map as above the imported WITs then did appear in my ADO project, as required.
Aside: Note that the Basic process doesn't actually have a Bug WIT (see here), so maybe Samples\config-basic.json needs updating not to reference it?
Everything appears to be imported into ADO correctly for both Bugs and Improvements. The only issue is that any inline images are not rendering in the Bugs for some unexplained reason!
Ok! Can you confirm whether or not this issue is related to https://github.com/solidify/jira-azuredevops-migrator/issues/851?
Just looking at the title of that issue, I would say no, because the attached images that should appear inline in the Description are still being imported as attachments. Note too this only affects the Description field of the custom Bug WIT. Any inline images in comments render perfectly well using the default mapping in the config json:
{
"source": "comment",
"target": "System.History",
"mapper": "MapRendered"
},
I'll have a deeper look at #851 though...
No, I'm pretty sure this has nothing to do with #851. Also, in my original ADO process, which also inherited from Basic, I only had one WIT type - Issue, with a custom field for Bug or Improvement (because at that time I didn't know you could add your own WITs!). The inline images in the Description field rendered fine in the ADO issues for both the 'Bug' and 'Improvement' Issues. It's only since I've created the custom WITs that this isn't happening for the new Bug WIT.
Also, I see nothing unusual in the history of the original Jira bug associated with the screenshot above; the user simply completed the Description and pasted in 2 screenshots. They weren't removed or re-added later on.
Agreed. I addressed your point about the Bug type in the Basic template in this commit: https://github.com/solidify/jira-azuredevops-migrator/commit/3361bb8f1ef777cc7c772111878ed977ddf50d2d
Here is the CorrectDescription method for reference:
I can see that the description field seems to be hard coded for various Work Item Types. If the WI Type name is "Bug", then it seems to switch over to using ReproSteps instead of Description. Could this be the underlying issue, do you think?
@Alexander-Hjelm Thank you so much for that info! Yes, my original config json above only had the one entry for the "source": "description"
field. When I changed it to this:
{
"source": "description",
"target": "System.Description",
"not-for": "Myprocess.Bug",
"mapper": "MapRendered"
},
{
"source": "description",
"target": "Microsoft.VSTS.TCM.ReproSteps",
"for": "Myprocess.Bug",
"mapper": "MapRendered"
},
then the Description field for the new Bug WIT was not populated at all once the issues were imported into ADO. So then I changed the custom Bug WIT in ADO to add a Repro Steps field and hide the Description field:
Finally, when I ran the importer again the inline images rendered for both my custom Improvements (in the Description field) and Bugs (in the Repro Steps field). Yay, at last! (All tested using 3.0.442 still.)
I guess users just have to be careful that if they create a custom WIT called 'Bug' they have to give it a Repro Steps field rather than a Description field, but the former makes more sense anyway.
Thanks, too, for updating docs/Samples/config-basic.json.
Thank you once again for all your help. This tool is great, buttressed by your timely support, and has really offset the sudden pain of being kicked off a Jira server that's about to be shut down.
No worries. I will create a new issue to follow up on this. It feels like we should build more general handling for WI/attachment links for all issue types.
Describe the problem In the source Jira server project I have Bugs and Improvements. Some of these have inline images/screenshots in their Description field. When I import these issues into the target ADO project, the inline images render in the standard Description field of the Improvements but not the Bugs; e.g.:
To Reproduce Extracts from the config json file:
where Myprocess is the name of my ADO process which inherits from Basic. Myprocess has Epic, Issue and Task disabled, but new work item types called Bug and Improvement. Both of these have the default System.Description field but are otherwise virtually identical. Neither WIT has a Repro Steps field (and so I don't refer to that in the config json file either).
When I look in the issue json files generated by jira-export you can see entries like this inside a Myprocess.Improvement's System.Description field:
...and this image renders perfectly inside the Description of the Improvement created in ADO.
But inside a Myprocess.Bug's System.Description field all you see is:
Note the images are still imported and are visible in the Links section of the ADO Bugs; they just aren't rendered in the Description.
Tool version 3.0.442