Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-53429

Attachment attribute has wrong conversion type

    Details

    • Similar Issues:

      Description

      Hi,

      Rocket Chat API expects a boolean value for titleLinkDownload in attachements object.

      cf : https://rocket.chat/docs/developer-guides/rest-api/chat/postmessage/#attachments-detail

      When this is true, a download icon appears and clicking this saves the link to file.

      This breaks the usage of attachements in the workflow pipeline syntax because it needs a string for titleLinkDownload. (MessageAttachment.java#L46)

      e.g. :

       

      rocketSend(
          attachments: [[
              title: 'My repository',
              color: 'red',
              text: 'unit test failed :sob:',
              thumbUrl: '',
              messageLink: '',
              collapsed: false,
              authorName: 'Zevran',
              authorIcon: '',
              authorLink: '',
              titleLink: 'https://github.com',
              titleLinkDownload: '',
              imageUrl: '',
              audioUrl: '',
              videoUrl: ''
          ]],
          channel: 'devops',
          message: '',
          avatar: 'https://github.com/fluidicon.png',
          failOnError: true,
          rawMessage: true
      )
      

       

      Regards

       

        Attachments

          Activity

          Hide
          zevran Gaël Reyrol added a comment -

          I submitted a pull request to solve this issue : https://github.com/jenkinsci/rocketchatnotifier-plugin/pull/25

           

          Show
          zevran Gaël Reyrol added a comment - I submitted a pull request to solve this issue : https://github.com/jenkinsci/rocketchatnotifier-plugin/pull/25  
          Hide
          mreinhardt Martin Reinhardt added a comment -

          fixed in develop branch.
          Will be corrected in the next release

          Show
          mreinhardt Martin Reinhardt added a comment - fixed in develop branch. Will be corrected in the next release
          Hide
          mreinhardt Martin Reinhardt added a comment -

          Fixed in 1.3.1

          Show
          mreinhardt Martin Reinhardt added a comment - Fixed in 1.3.1

            People

            • Assignee:
              mreinhardt Martin Reinhardt
              Reporter:
              zevran Gaël Reyrol
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: