solidify / jira-azuredevops-migrator

Tool to migrate work items from Atlassian Jira to Microsoft Azure DevOps/VSTS/TFS.
MIT License
264 stars 228 forks source link

show round time in effort field #1031

Closed coderboy312 closed 7 months ago

coderboy312 commented 7 months ago

Describe the problem

When I try to import my effort from Jira to ADO, then If It's 10m then it's converting value something like 0.3333333 which is but obvious weird to show, and I am using MapRemainingWork as mapper. Please find my config json code of importing effor below.

Please attach the following files:

{ "source": "TimeSpent", "target": "Microsoft.VSTS.Scheduling.Effort", "mapper": "MapRemainingWork" }

Alexander-Hjelm commented 7 months ago

Check this section in our FAQ and come back if that still did not solve your problem: https://github.com/solidify/jira-azuredevops-migrator/blob/master/docs/faq.md#7-how-to-migrate-the-work-log-time-spent-remaining-estimate-fields

coderboy312 commented 7 months ago

Do I need to shift at latest 3.0.407? right now I am at 3.0.307 @Alexander-Hjelm .

Although it doesn't working for me, I just checked my export item file, it's not even taking my timespent value.

{ "source": "timespent$Rendered", "target": "Microsoft.VSTS.Scheduling.Effort", },

Alexander-Hjelm commented 7 months ago

New version does not address the effort fields. ^^

Maybe try to migrate the field to a custom integer field for the purpose of testing?

I don't know if maybe the VSTS fields could have automation behind them or not.

Here is a config sample that has worked for me before:

      {
        "source": "timespent$Rendered",
        "target": "Custom.TimeSpentHours"
      },
      {
        "source": "timespent",
        "target": "Custom.TimeSpentSeconds"
      },
Alexander-Hjelm commented 7 months ago

Maybe the MapRemainingWork mapper could help you as well:

        {
          "source": "timeestimate",
          "target": "Microsoft.VSTS.Scheduling.RemainingWork",
          "mapper": "MapRemainingWork",
          "for": "Bug,Task"
        },

I don't think the tool can convert hours to minutes as of today, because only seconds and hours is available in jira. If a field has decimal value for the number of hours, then the same value will be migrated to ADO.

coderboy312 commented 7 months ago

Thanks for response this does work for me but let's say I've one task which have time spent 25.666666667 then It's showing 25.6666667 in my effort field in ADO, is there any way that I use so I get round figure value or 25.7 something because 25.66666667 is very weird to show. @Alexander-Hjelm

Alexander-Hjelm commented 7 months ago

Not to my knowledge, at the moment. We would need to update the MapRemainingWork mapper, or write a new mapper entirely.

One workaround could be to write an automation in powershell that accomplishes the same thing between your export and import steps.

coderboy312 commented 7 months ago

Ok, and I noticed one thing that my history which in Jira work item which isn't fully showing in my ADO work item.

Alexander-Hjelm commented 7 months ago

The usually means there is data which you have not mapped, or there were errors during the export or import and some revisions were not fully migrated. Check the log files!

coderboy312 commented 7 months ago

Thanks mate!! for help, last thing do you have any reference where I can take help from to achieve the idea you suggested about automation in powershell?

Alexander-Hjelm commented 7 months ago

OpenAI and general scripting knowledge probably ^^ I can check if we have any sample scripts that you can base your own work on. Stand by

Alexander-Hjelm commented 7 months ago

fix-field.py.txt

Here is a fairly undocumented python script which we have used to fix fields post-migration!

coderboy312 commented 7 months ago

Thanks Mate !!! Appreciate