Import xray ManualTestSteps using scriptRunner

Viktor Fedun August 8, 2023

Hi, I moved from one jira instance to another using backup and that works file except of xray
all ManualTestSteps fields are empty on a new instance
instance is running and ahed and I'm not sure is it possible to use xporter in such cases...
Using scriptRunner I wrote export script that creates json file with a such structure
```

{
    "steps": [
      {
        "index"1,
        "attachments": [
          {
            "createdDate""2022-06-09T13:45:21+0000",
            "created""2022-06-09T16:45:21+03:00",
            "filePath""\\SSS\\50000\\SSS-88888\\xray_83763",
            "fileSize""56 kB",
            "authorFullName""someName",
            "id"44135,
            "mimeType""image/png",
            "entityContext"null,
            "fileIconAlt""PNG File",
            "fileName""Screenshot 2023-06-09 at 16.43.16.png",
            "fileIcon""image.gif",
            "numericalFileSize"57426,
            "MIMEType""image/png",
            "author""gavryloi",
          }
        ],
        "fields": {
          "Action""1. SSS",
          "Data""",
          "Expected Result""SSS"
        },
        "id"4494,
        "testCallBean"null
      },
      {
        "index"2,
        "attachments": [],
        "fields": {
          "Action""YYY",
          "Data""",
          "Expected Result""YYY"
        },
        "id"4495,
        "testCallBean"null
      }
    ],
    "empty"false
  }```
I tried to import like
```
 customField.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(customField), exportedFieldValue['steps']),changeHolder)```
but class java.util.ArrayList cannot be cast to class com.xpandit.raven.customfield.ManualTestStepsCustomField$TestStepSingleTransport
what ways should I use?

there is over 1000+ issueses, manual fix for every issue is not an option
do we have any api for scriptRunner or for post at least?

1 answer

0 votes
Ram Kumar Aravindakshan _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 14, 2023

Hi @Viktor Fedun

Could you please share the full code that you are using so I can review it and provide some feedback.

Thank you and Kind regards,
Ram

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events