The Exalate team will be on holiday for the coming days - returning Jan 4
Enjoy & stay safe

How to make an attachment internal in Jira ?

 
1
0
-1

Hi,


I have been trouble to find how to make an attachment internal in Jira.


When synchronizing from AZD to Jira, only my comments are made private, but if there was attachments, they are made publics in Jira.


For the comment, it is documented and I have been doing the following : 



issue.comments       = commentHelper.mergeComments(issue, replica, {it.internal = true; it})

But for Attachment, it seems there is no way to apply an internal field.

issue.attachments = attachmentHelper.mergeAttachments(issue, replica)


Sincerely,

Kévin






    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi Kevin,


      You may want to change the attachments script to:


      replica.attachments = issue.attachments.findAll { a ->
        def isMentionedInPublicComments = replica.comments.any {
          c -> c.body.contains("[^" + a.filename + "]") ||
              (c.body =~ (/!${java.util.regex.Pattern.quote(a.filename)}(\|.*!|!)/.toString())).find()
          }
        isMentionedInPublicComments
      }

      Kind regards,

      Ariel

        CommentAdd your comment...