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

Issue migrating a user picker custom field #794

Closed
RoyalWulf opened this issue Jun 23, 2023 · 6 comments · Fixed by #873
Closed

Issue migrating a user picker custom field #794

RoyalWulf opened this issue Jun 23, 2023 · 6 comments · Fixed by #873
Assignees
Labels
bug Something isn't working

Comments

@RoyalWulf
Copy link

Describe the problem
This is a similar issue to
https://github.com/solidify/jira-azuredevops-migrator/issues/179
https://github.com/solidify/jira-azuredevops-migrator/issues/191

In Jira we have a user picker custom field named BA, but it is not exported until it has a second revision

I create a new user story and I give BA (user picker custom field) a value.
If I run jira-export it does not export the custom field.
See US-27012 - V1.json.txt below for the user story json file

If I make a change to the field BA and run jira-export, it does export the field.
See US-27012-V2.json.txt below.

have attached the export log for the two exports.

this should work the first time.

A clear and concise description of what the problem/bug is.

To Reproduce
Steps to reproduce the behavior:
run jira-export

Tool version
3.0.136

Attachments

Please attach the following files:
US-27012 - V1.json.txt

US-27012-V2.json.txt

config-agile_SMS.json.txt

jira-export-log-230623-134237_V1.txt

jira-export-log-230623-134708_V2.txt

Screenshots
If applicable, add screenshots to help explain your problem.

@Alexander-Hjelm Alexander-Hjelm added the bug Something isn't working label Jun 28, 2023
@Alexander-Hjelm Alexander-Hjelm added support and removed bug Something isn't working labels Sep 8, 2023
@Alexander-Hjelm
Copy link
Collaborator

@RoyalWulf, I have successfully migrated a custom issue picker. Here is how I did it. Give it a try and let me know if your issue still persists:

Custom field alexander-testar-custom-userpicker on my Jira issue:

image

Inspecting the REST API response gives me the field key:

image

So I set up the following field map:

image

And the resulting field becomes:

image

@RoyalWulf
Copy link
Author

The issue I had was it worked if there had been a change to the value ie had history but didn't work if there was no change.
Will test but busy on other things at the moment

@Alexander-Hjelm
Copy link
Collaborator

After some digging I realized that this is exactly the edge case we solved and are now supporting in Jira Azure DevOps Migrator PRO. So unfortunately we will officially support custom userpicker fields in the PRO version and not in the Community version.

You can read more about the PRO offering here: https://github.com/solidify/jira-azuredevops-migrator#jira-azure-devops-migrator-pro

For some details, the field looks like this in the REST API response:

  "customfield_10065": {
    "self": "https://solidifydemo.atlassian.net/rest/api/2/user?accountId=6038bfcc25b84e00696240d3",
    "accountId": "6038bfcc25b84e00696240d3",
    "emailAddress": "[email protected]",
    "avatarUrls": {
      "48x48": "https://secure.gravatar.com/avatar/e57bc21be69a2940bfa10a99ab4f6d74?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAH-1.png",
      "24x24": "https://secure.gravatar.com/avatar/e57bc21be69a2940bfa10a99ab4f6d74?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAH-1.png",
      "16x16": "https://secure.gravatar.com/avatar/e57bc21be69a2940bfa10a99ab4f6d74?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAH-1.png",
      "32x32": "https://secure.gravatar.com/avatar/e57bc21be69a2940bfa10a99ab4f6d74?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FAH-1.png"
    },
    "displayName": "Alexander Hjelm",
    "active": true,
    "timeZone": "Europe/Berlin",
    "accountType": "atlassian"
  },

The PRO version lets you set up a custom-key property of your field mapping, which extracts e.g. the emailAddress or accountId property of the field, and is meant for cases where no properties such as id or name are present.

      {
        "source": "customfield_10065",
        "custom-key": "emailAddress",
        "target": "Custom.CustomUserPicker",
        "mapper": "MapUser"
      }

@Alexander-Hjelm
Copy link
Collaborator

@RoyalWulf, I fixed a bug where a UserPicker field was only migrated on the first revision and no subsequent revisions. I'll supply a build here. Give it a try if you are still experiencing this issue. Let me know if that solved your issue.

Debug.zip

@Alexander-Hjelm
Copy link
Collaborator

Merged #873 . Reopen the issue if the problem still persists.

@Alexander-Hjelm
Copy link
Collaborator

This was the field map that ended up working for me. source should be the field name:

      {
        "source": "Userpicker Field Name Jira",
        "target": "Custom.CustomUserPicker",
        "source-type": "name",
        "mapper": "MapUser"
      },

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