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

cannot update 'Fixed in build' field of youtrack with current build number

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • youtrack-plugin
    • None
    • Jenkina master 1.625.2 Ubuntu 14.04

      Hi

      I am trying to update the 'Fixed in build' field with the current build number - but can't I got the following error in the log file : 09:39:36 FAILED: adding build 148 to bundle:

      I can see that Jenkins add a link for every relevant case in youtrack - but I can't change the specific field.

      I am using the post action youtrack build updater.

      Thanks , Mor

          [JENKINS-31874] cannot update 'Fixed in build' field of youtrack with current build number

          Erik Zielke added a comment -

          Sorry for not getting back earlier.

          It seems like you haven't set the bundle name which the build should be added to. The bundle names doesn't seem to be visible in the YouTrack UI anymore - but for Fixed in Build it is often something like Project Name: Builds and you can get them by calling:

          http://youtrackserverurl/rest/admin/customfield/buildBundle

          Erik Zielke added a comment - Sorry for not getting back earlier. It seems like you haven't set the bundle name which the build should be added to. The bundle names doesn't seem to be visible in the YouTrack UI anymore - but for Fixed in Build it is often something like Project Name: Builds and you can get them by calling: http://youtrackserverurl/rest/admin/customfield/buildBundle

          Itai Sanders added a comment -

          I was experiencing the same problem.

          I looked into it, and it says that YouTrack deprecated the Bundles on their latest upgrade.

          Any chance to change this feature to update a CustomField as this seems to be the native replacement for it. I myself am trying to do just that - use Jenkins to add a new variable to a global enum field.

          Thanks,
          Itai

          Itai Sanders added a comment - I was experiencing the same problem. I looked into it, and it says that YouTrack deprecated the Bundles on their latest upgrade. Any chance to change this feature to update a CustomField as this seems to be the native replacement for it. I myself am trying to do just that - use Jenkins to add a new variable to a global enum field. Thanks, Itai

          Erik Zielke added a comment -

          Yes - I will hopefully have time to look at this weekend - the bundles does as far as I can see still work - and does get created - they just have an id - so can be difficult to match to the corresponding field)

          Erik Zielke added a comment - Yes - I will hopefully have time to look at this weekend - the bundles does as far as I can see still work - and does get created - they just have an id - so can be difficult to match to the corresponding field)

          Code changed in jenkins
          User: Erik Zielke
          Path:
          src/main/java/org/jenkinsci/plugins/youtrack/YouTrackBuildUpdater.java
          src/main/java/org/jenkinsci/plugins/youtrack/YouTrackProjectProperty.java
          src/main/java/org/jenkinsci/plugins/youtrack/YoutrackCreateIssueOnBuildFailure.java
          src/main/java/org/jenkinsci/plugins/youtrack/youtrackapi/Field.java
          src/main/java/org/jenkinsci/plugins/youtrack/youtrackapi/YouTrackServer.java
          src/main/resources/org/jenkinsci/plugins/youtrack/YouTrackBuildUpdater/config.jelly
          src/main/resources/org/jenkinsci/plugins/youtrack/YouTrackBuildUpdater/config.properties
          src/main/resources/org/jenkinsci/plugins/youtrack/YouTrackBuildUpdater/help-fieldBuildBundleToUpdate.html
          src/test/java/org/jenkinsci/plugins/youtrack/YouTrackBuildUpdaterTest.java
          http://jenkins-ci.org/commit/youtrack-plugin/9b985fba1b908779dfd316b93f229df0aa3c4691
          Log:
          use field name instead of bundle to select which bundle to update - JENKINS-31874

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Erik Zielke Path: src/main/java/org/jenkinsci/plugins/youtrack/YouTrackBuildUpdater.java src/main/java/org/jenkinsci/plugins/youtrack/YouTrackProjectProperty.java src/main/java/org/jenkinsci/plugins/youtrack/YoutrackCreateIssueOnBuildFailure.java src/main/java/org/jenkinsci/plugins/youtrack/youtrackapi/Field.java src/main/java/org/jenkinsci/plugins/youtrack/youtrackapi/YouTrackServer.java src/main/resources/org/jenkinsci/plugins/youtrack/YouTrackBuildUpdater/config.jelly src/main/resources/org/jenkinsci/plugins/youtrack/YouTrackBuildUpdater/config.properties src/main/resources/org/jenkinsci/plugins/youtrack/YouTrackBuildUpdater/help-fieldBuildBundleToUpdate.html src/test/java/org/jenkinsci/plugins/youtrack/YouTrackBuildUpdaterTest.java http://jenkins-ci.org/commit/youtrack-plugin/9b985fba1b908779dfd316b93f229df0aa3c4691 Log: use field name instead of bundle to select which bundle to update - JENKINS-31874

          looks like this commit introduced another issue:

          when there's no `buildBundle` defined and current build doesn't have fixed issues - then the plugin can't find which buildBundle to use, so it simply does not do anything

          I fixed that by going to config.xml for the job and in node <org.jenkinsci.plugins.youtrack.YouTrackBuildUpdater added <bundleName>Builds</bundleName> and removed <fieldBuildBundleToUpdate></fieldBuildBundleToUpdate>

          Alexander Petrov added a comment - looks like this commit introduced another issue: when there's no `buildBundle` defined and current build doesn't have fixed issues - then the plugin can't find which buildBundle to use, so it simply does not do anything I fixed that by going to config.xml for the job and in node <org.jenkinsci.plugins.youtrack.YouTrackBuildUpdater added <bundleName>Builds</bundleName> and removed <fieldBuildBundleToUpdate></fieldBuildBundleToUpdate>

          also the plugin reverts the values from config if job configuration is changed via UI

          Alexander Petrov added a comment - also the plugin reverts the values from config if job configuration is changed via UI

            erikzielke Erik Zielke
            morlajb2 mor lajb
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: