SonarQube Plugins
  1. SonarQube Plugins
  2. SONARPLUGINS-2134

Link to Jira fails - due to missing values for some mandatory fields

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JIRA-1.0
    • Fix Version/s: JIRA-1.1
    • Component/s: Jira
    • Labels:
      None
    • Environment:
      Sonar v.3.1.1
      Jira plugin version 1.0
      Atlassian JIRA (v4.3.4#620-r152668)
    • Number of attachments :
      0

      Description

      When i try to link a sonar issue with Jira, It failed with the std error on the sonar window saying "Impossible to create the issue on the JIRA server ..."
      Upon debugging, found that a few custom jira fields that were made mandatory also needed values to be set from the sonar side.
      Can you make it possible to allow setting default values to the custom fields on the Sonar side during Linking apart from the std description field.

        Issue Links

          Activity

          Hide
          Deepak Panchal added a comment -

          For now, we have marked those fields as optional and going ahead.
          FYI.. It creates an issue of type 'Task' and not 'Bug' just in case anyone is interested in knowing. Since we were trying to know which template needs to be fixed in order to proceed.

          Show
          Deepak Panchal added a comment - For now, we have marked those fields as optional and going ahead. FYI.. It creates an issue of type 'Task' and not 'Bug' just in case anyone is interested in knowing. Since we were trying to know which template needs to be fixed in order to proceed.
          Hide
          Fabrice Bellingard added a comment -

          Hi Deepak,

          You've found the way to go ahead, that's perfect. For information, which fields were mandatory on your side?

          This first version of the JIRA plugin - which can create issues on a JIRA server, can and will be improved in the future to be more customizable so that it's easier to integrate it in customized workflows. For instance, we should make it possible to decide which kind of issue to create - as you said it is currently a 'Task'.

          Show
          Fabrice Bellingard added a comment - Hi Deepak, You've found the way to go ahead, that's perfect. For information, which fields were mandatory on your side? This first version of the JIRA plugin - which can create issues on a JIRA server, can and will be improved in the future to be more customizable so that it's easier to integrate it in customized workflows. For instance, we should make it possible to decide which kind of issue to create - as you said it is currently a 'Task'.
          Hide
          amarkhot added a comment -

          Thanks man.

          Show
          amarkhot added a comment - Thanks man.
          Hide
          Deepak Panchal added a comment - - edited

          Also wanted to add one more possible feature - Currently there is only a single "Link to Jira" button for a particular Issue. We also wanted to see a possibility of linking ALL or a specific set of violations reported by Sonar to a Jira Issue and track them in Jira. Currently its very cumbersome to go to each issue and click on the button to link it to Jira. If an option is available at a higher level either in the review page or violations page to link all the violations to Jira then it would be helpful.
          Thanks.
          Have also created an Improvement task for the above item : SONARPLUGINS-2423

          Show
          Deepak Panchal added a comment - - edited Also wanted to add one more possible feature - Currently there is only a single "Link to Jira" button for a particular Issue. We also wanted to see a possibility of linking ALL or a specific set of violations reported by Sonar to a Jira Issue and track them in Jira. Currently its very cumbersome to go to each issue and click on the button to link it to Jira. If an option is available at a higher level either in the review page or violations page to link all the violations to Jira then it would be helpful. Thanks. Have also created an Improvement task for the above item : SONARPLUGINS-2423
          Hide
          amarkhot added a comment -

          Hi Guys, Is it possible to change the error message for not connecting to JIRA due to Mandatory fields. currently it is only show's impossible to connect to JIRA. If error message pops up saying its due to mandatory fields or some thing like this. It will be helpful to users.
          Thanks
          Amar

          Show
          amarkhot added a comment - Hi Guys, Is it possible to change the error message for not connecting to JIRA due to Mandatory fields. currently it is only show's impossible to connect to JIRA. If error message pops up saying its due to mandatory fields or some thing like this. It will be helpful to users. Thanks Amar
          Hide
          Robin Stephenson added a comment -

          We are experiencing the same problem; the compulsory field in our Jira config is Component. Ideally, we'd like to be able to do two bits of tuning:

          • specify issue type (although we can live with Task for the moment)
            * specify component within project (don't really see a nice way to work around this, I'd rather not make this optional for all non-Sonar users…)

          In the interim, as amarkhot mentioned, it would be useful to reflect the soapenv:Fault faultstring back to the user, we found it "com.atlassian.jira.rpc.exception.RemoteValidationException:
          {components=Component/s is required.} : []
          " by sniffing the TCP traffic in the end.

          Show
          Robin Stephenson added a comment - We are experiencing the same problem; the compulsory field in our Jira config is Component. Ideally, we'd like to be able to do two bits of tuning: specify issue type (although we can live with Task for the moment) * specify component within project (don't really see a nice way to work around this, I'd rather not make this optional for all non-Sonar users…) In the interim, as amarkhot mentioned, it would be useful to reflect the soapenv:Fault faultstring back to the user, we found it " com.atlassian.jira.rpc.exception.RemoteValidationException: {components=Component/s is required.} : [] " by sniffing the TCP traffic in the end.
          Hide
          Julien HENRY added a comment -

          @Robin SONARPLUGINS-2549 Created to allow configuration of components.

          Show
          Julien HENRY added a comment - @Robin SONARPLUGINS-2549 Created to allow configuration of components.
          Hide
          Julien HENRY added a comment -

          Error message when there is a validation exception (for example when a mandatory field is not set) will now be displayed in Sonar UI, helping users to understand the cause of failure when creating a JIRA issue.

          Concerning mandatory fields that are not populated by default by Sonar, we are suggesting that people create a new JIRA issue type and use it when creating issues from Sonar reviews (thanks to SONARPLUGINS-2548). For this new issue type simply make fields optional.

          Show
          Julien HENRY added a comment - Error message when there is a validation exception (for example when a mandatory field is not set) will now be displayed in Sonar UI, helping users to understand the cause of failure when creating a JIRA issue. Concerning mandatory fields that are not populated by default by Sonar, we are suggesting that people create a new JIRA issue type and use it when creating issues from Sonar reviews (thanks to SONARPLUGINS-2548 ). For this new issue type simply make fields optional.
          Hide
          Fabrice Bellingard added a comment -

          For reference, entry of the JIRA Plugin FAQ: http://docs.codehaus.org/display/SONAR/JIRA+Plugin#JIRAPlugin-FAQ

          Show
          Fabrice Bellingard added a comment - For reference, entry of the JIRA Plugin FAQ: http://docs.codehaus.org/display/SONAR/JIRA+Plugin#JIRAPlugin-FAQ

            People

            • Assignee:
              Julien HENRY
              Reporter:
              Deepak Panchal
            • Votes:
              6 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: