Skip to content

Move issues to matching JQL doesn't work with api.atlassian.com #747

@gilesyunex

Description

@gilesyunex

Jenkins and plugins versions report

Environment
Jenkins: 2.533
OS: Windows Server 2019 - 10.0
---
IncrediBuild:1.0.0
active-directory:2.40
analysis-model-api:13.11.0-919.vda_c75b_c73b_cc
ant:520.vd082ecfb_16a_9
antisamy-markup-formatter:173.v680e3a_b_69ff3
any-buildstep:14.ve115ec1484f0
apache-httpcomponents-client-4-api:4.5.14-269.vfa_2321039a_83
apache-httpcomponents-client-5-api:5.5-170.v023de017ccd7
artifact-manager-s3:951.v74e888e4e3f2
asm-api:9.9-185.va_6c6b_3348b_c3
audit-trail:436.vc0d1e79fc5a_3
authentication-tokens:1.144.v5ff4a_5ec5c33
aws-credentials:254.v978a_5e206a_d7
aws-global-configuration:152.ve13a_2a_c319a_9
aws-java-sdk:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-api-gateway:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-autoscaling:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-cloudformation:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-cloudfront:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-cloudwatch:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-codebuild:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-codedeploy:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-ec2:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-ecr:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-ecs:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-efs:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-elasticbeanstalk:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-elasticloadbalancingv2:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-iam:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-kinesis:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-lambda:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-logs:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-minimal:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-organizations:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-secretsmanager:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-sns:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-sqs:1.12.780-480.v4a_0819121a_9e
aws-java-sdk-ssm:1.12.780-480.v4a_0819121a_9e
aws-java-sdk2-core:2.33.4-62.vc1a_8df64b_4c9
aws-java-sdk2-ec2:2.33.4-62.vc1a_8df64b_4c9
aws-java-sdk2-s3:2.33.4-62.vc1a_8df64b_4c9
bootstrap5-api:5.3.8-895.v4d0d8e47fea_d
bouncycastle-api:2.30.1.82-277.v70ca_0b_877184
branch-api:2.1255.v2f5fe203584a_
build-name-setter:2.5.1
build-timeout:1.38
build-user-vars-plugin:195.v8c35f9d5c3dc
caffeine-api:3.2.2-178.v353b_8428ed56
checks-api:373.vfe7645102093
cloudbees-folder:6.1062.v2877b_d6b_b_eeb_
command-launcher:123.v37cfdc92ef67
commons-collections4-api:4.5.0-8.va_d5448ef9011
commons-lang3-api:3.19.0-104.v12125f33a_255
commons-text-api:1.14.0-194.v804a_dc3a_1b_d8
conditional-buildstep:1.5.0
coverage:2.2977.v0e1c1d11042d
credentials:1447.v4cb_b_539b_5321
credentials-binding:702.vfe613e537e88
dashboard-view:2.543.vca_9da_3cb_9c60
data-tables-api:2.3.4-1451.vb_0b_5238f9054
discard-old-build:1.08
display-url-api:2.217.va_6b_de84cc74b_
docker-commons:457.v0f62a_94f11a_3
docker-workflow:634.vedc7242b_eda_7
dtkit-api:3.0.3
durable-task:605.v9a_b_9040c9970
echarts-api:6.0.0-1165.vd1283a_3e37d4
eddsa-api:0.3.0.1-19.vc432d923e5ee
email-ext:1933.v45cec755423f
envinject:2.926.v69c9b_3896a_96
envinject-api:1.235.va_14c74f8f487
external-monitor-job:223.vb_fddcf42c9b_3
flexible-publish:0.16.1
font-awesome-api:7.1.0-882.v1dfb_771e3278
forensics-api:3.1772.v99ca_3d83b_9fa_
git:5.8.0
git-client:6.4.0
git-parameter:444.vca_b_84d3703c2
git-server:137.ve0060b_432302
gitlab-plugin:1.9.9
gson-api:2.13.2-173.va_a_092315913c
instance-identity:203.v15e81a_1b_7a_38
ionicons-api:94.vcc3065403257
jackson2-api:2.20.0-420.v8a_08b_d57ca_05
jakarta-activation-api:2.1.3-2
jakarta-mail-api:2.1.3-3
jakarta-xml-bind-api:4.0.5-3.v3d5b_a_73965b_9
javadoc:354.vee1a_660b_4990
javax-activation-api:1.2.0-8
javax-mail-api:1.6.2-11
jaxb:2.3.9-133.vb_ec76a_73f706
jdk-tool:83.v417146707a_3d
jersey2-api:2.47-165.ve7809a_3e87e0
jira:3.19
jnr-posix-api:3.1.20-166.v50a_50932c65b_
jobConfigHistory:1356.ve360da_6c523a_
joda-time-api:2.14.0-149.v1c3ce991d1b_9
jquery:1.12.4-3
jquery3-api:3.7.1-619.vdb_10e002501a_
jsch:0.2.16-95.v3eecb_55fa_b_78
json-api:20250517-173.v596efb_962a_31
json-path-api:2.9.0-190.veefca_05d5477
jsoup:1.21.2-66.v6ea_38164b_8a_2
junit:1369.v15da_00283f06
ldap:793.v754d6b_41b_ea_4
lockable-resources:1432.v7f7b_69fb_d328
log-parser:2.5.0
mailer:522.va_995fa_cfb_8b_d
mapdb-api:1.0.9-44.va_1e1310c9118
matrix-auth:3.2.8
matrix-project:870.v9db_fcfc2f45b_
maven-plugin:3.27
mina-sshd-api-common:2.16.0-167.va_269f38cc024
mina-sshd-api-core:2.16.0-167.va_269f38cc024
next-build-number:66.v4b_4762172d53
okhttp-api:4.12.0-195.vc02552c04ffd
oss-symbols-api:412.v719e66895255
pam-auth:1.12
pipeline-build-step:571.v08a_fffd4b_0ce
pipeline-graph-analysis:245.v88f03631a_b_21
pipeline-groovy-lib:776.vfee5327b_b_a_5b_
pipeline-input-step:534.v352f0a_e98918
pipeline-milestone-step:138.v78ca_76831a_43
pipeline-model-api:2.2273.v643f36ed9e94
pipeline-model-definition:2.2273.v643f36ed9e94
pipeline-model-extensions:2.2273.v643f36ed9e94
pipeline-rest-api:2.38
pipeline-stage-step:322.vecffa_99f371c
pipeline-stage-tags-metadata:2.2273.v643f36ed9e94
pipeline-stage-view:2.38
plain-credentials:199.v9f8e1f741799
plasticscm-plugin:4.4
plugin-util-api:6.1192.v30fe6e2837ff
pollscm:1.9
powershell:2.3
preSCMbuildstep:115.vf9808414429d
prism-api:1.30.0-630.va_e19d17f83b_0
purge-job-history:74.vf21030329dda_
resource-disposer:0.25
run-condition:243.v3c3f94e46a_8b_
scm-api:712.v8846fdd68c88
scoring-load-balancer:202.ve8d1e11694e2
script-security:1378.vf25626395f49
skip-certificate-check:50.vcfa_cdb_b_27312
sloccount:1.27
snakeyaml-api:2.3-125.v4d77857a_b_402
sonar:2.18
ssh-credentials:361.vb_f6760818e8c
sshd:3.374.v19b_d59ce6610
structs:353.v261ea_40a_80fb_
thinBackup:2.1.3
throttle-concurrents:2.18
timestamper:1.30
token-macro:477.vd4f0dc3cb_cf1
trilead-api:2.209.v0e69b_c43c245
variant:70.va_d9f17f859e0
versionnumber:234.v315d3b_3cb_fb_5
warnings-ng:12.9848.v5603977006f2
workflow-aggregator:608.v67378e9d3db_1
workflow-api:1384.vdc05a_48f535f
workflow-basic-steps:1098.v808b_fd7f8cf4
workflow-cps:4209.v83c4e257f1e9
workflow-durable-task-step:1464.v2d3f5c68f84c
workflow-job:1559.va_a_533730b_ea_d
workflow-multibranch:821.vc3b_4ea_780798
workflow-scm-step:452.vdf1ca_c8d3a_87
workflow-step-api:710.v3e456cc85233
workflow-support:1004.veee3a_d67cdb_9
ws-cleanup:0.49
xunit:3.1.5

What Operating System are you using (both controller, and any agents involved in the problem)?

Windows Server 2019 / 2022

Reproduction steps

  1. Existing working free-style project has a post build action: Jira: Move issues matching JQL to the specified version. JQL is issue in (${JIRA_ISSUES})
  2. In Jenkins, the JIRA URL was changed from https://mycompany.atlassian.net/ to https://api.atlassian.com/ex/jira/cloudId/ as required by our IT department as they are tightening up access.
  3. At same time a new JIRA service account and API token was created with the requisite permissions and scopes.

Expected Results

After the change, the Jenkins - JIRA integration should behave as it did previously.

Actual Results

After the change, the Jenkins - JIRA integration does behave as it did previously EXCEPT for:

The Fix Version for the JIRA issues is no longer being updated with the the build version. There is an error and exception in the jenkins.err.log:

2025-10-25 10:31:46.414+0000 [id=721]	WARNING	h.plugins.jira.JiraRestService#getIssuesFromJqlSearch: Jira REST client get issue from jql search error. cause: RestClientException{statusCode=Optional.of(410), errorCollections=[ErrorCollection{status=410, errors={}, errorMessages=[The requested API has been removed. Please migrate to the /rest/api/3/search/jql API. A full migration guideline is available at https://developer.atlassian.com/changelog/#CHANGE-2046]}]}

The other actions of the Jira plug-in are working correctly. This includes

  • identifying JIRA tickets in the git commit messages and adding JIRA links in the Changes log.
  • adding build completion status comments to the ticket
  • creating a version in JIRA for the new build.

Anything else?

Having looked at issue #636, I can see that the support for the new API went in then - but the real support is provided by the jira-rest-java-client library. I've looked at that code to see how it works out whether it is talking to Jira Cloud or Jira Server and it has a routine isURICloud which returns true if the host name contains atlassian.net or jira.com. This would seem to be the reason - as api.atlassian.com doesn't fit this pattern. So I'm pretty sure the bug is in this library. However, I could not find an easy way to report an issue against this library - so I'm reporting it here, assuming that maintainers here have links with the developers of that library - and in any case, the Jenkins plug-in would need to be updated to use any new version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions