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

Comment not completely exported #930

Open
tenderi opened this issue Dec 20, 2023 · 3 comments
Open

Comment not completely exported #930

tenderi opened this issue Dec 20, 2023 · 3 comments
Assignees
Labels
bug Something isn't working Jira Server Bug only appears on Jira Server

Comments

@tenderi
Copy link

tenderi commented Dec 20, 2023

Describe the problem

I use this configuration from the template:

  {
    "source": "comment",
    "target": "System.History",
    "mapper": "MapRendered"
  },

I have encountered a case where comment is only partly exported from Jira. Comment is approximately this:

Something something /DWTest/ABCDEF. For now only in dev. Done for the ticket TICKET-209 needs. EXT External User

What happens is that the link and the word "needs" that comes after it simply disappear, so the final comment in imported work item looks like this:

Something something /DWTest/ABCDEF. For now only in dev. Done for the ticket EXT External User

If I remove the mapper from the configuration, the whole text does appear, but of course all the links to both users and tickets will get broken.

The project has several thousand tickets and I am looking for a second instance, but this seems quite a major bug, as my organization relies on having all the comments intact for audit purposes for several years.

To Reproduce

Managed to replicate this consistently. It seems like

[TICKET-123] word [~user]

is the breaking pattern.

Steps to reproduce the behavior:

  1. Create ticket
  2. Add a comment like "something something [TICKET-123] something [~ext_usr]
  3. Export the ticket
  4. In the exported JSON '[TICKET-123] something' will be missing.

Tool version
3.0.284

Attachments

Please attach the following files:

I created a test ticket and tried a few variants of the form to find out how it breaks.

jira-export-log-231220-103620.txt

Also removed irrelevant parts from config.json:

config-elo-rapkeh copy.json

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

@tenderi I tried to reproduce your issue in Jira Cloud but so far haven't had any luck. Everything seems to work fine.

Maybe you can tell me if have have done something wrong? Otherwise can you identify any particular conditions under which the error happens for you?

Here is my field map:

      {
        "source": "comment",
        "target": "System.History",
        "mapper": "MapRendered"
      },

I tried a few variations of the above pattern:

image

Here is the corresponding issue in ADO, everything looks good:

image

Here is the exported issue file for reference: AGILEDEMO-44.json

@Alexander-Hjelm Alexander-Hjelm added support and removed bug Something isn't working labels Dec 25, 2023
@Alexander-Hjelm Alexander-Hjelm self-assigned this Dec 25, 2023
@tenderi
Copy link
Author

tenderi commented Jan 2, 2024

Weird. I can still reproduce the bug 100% of the cases. The issue must be in the exporter, possibly with the MapRendered-function, as the text doesn't even show in the exported file. The behaviour happens in both description and comment fields. I use identical typemap as the one you provided.

We are not using Jira Cloud though, but Jira Server (v9.11.3). I don't have experience with Cloud edition, but afaik the cloud version has been updated quite much. I wonder if the links are somehow different? Our Jira address is also a bit un-typical, as it's something like this: https://jira.shared.foo.bar.com/

@Alexander-Hjelm Alexander-Hjelm added Jira Server Bug only appears on Jira Server bug Something isn't working and removed support labels Jan 2, 2024
@bm-fez
Copy link

bm-fez commented Apr 24, 2024

Description

I think I have another example of this issue....

I have Jira comments that include hyperlinks. The exporter is exporting the commits, but losing the Hyper-Links

As noted above, the export manifest is set to use the MapRendered mapper

  {
        "source": "comment",
        "target": "System.History",
        "mapper": "MapRendered"
      },

If use, what I think is the API call used by the exporter /rest/api/2/issue/<ticket>?expand=changelog, I see the link in the returned in the form [text|url]

 "comment": {
     "startAt": 0,
     "maxResults": 4,
     "total": 4,
     "comments": [
         {
             "self": "<base url>/rest/api/2/issue/34822/comment/75246",
             "id": "75246",
             "author": { .. }
             "body": "A draft script has now been written and merge request created on Gitlab [here|https://<gitlab url>]. It's been assigned to [~another.person] for checking.\r\n\r\nWe're aiming to deliver the estimated response rates by Friday.",
    ....
    },

But if I look in the exported JSON file I find the comment, but don't see the link, or part of the text just after it.

"Fields": [
        {
          "ReferenceName": "System.History",
          "Value": "<p>A draft script has now been written and merge request created on Gitlab Another Person for checking.</p>\n\n<p>We're aiming to deliver the estimated response rates by Friday.</p>"
        }
      ],

I am using an on-prem Jira instance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Jira Server Bug only appears on Jira Server
Projects
None yet
Development

No branches or pull requests

3 participants