Hello. I am new to JIRA and Atlassian products. My interest grows every day though. I have anOutput Ansible playbook that is supposed to query my trial JIRA for all task metadata under a project named "PROJ'. It fails with a notice of JQL deprecation.
#############ANSIBLE CODE#######################
[ansible_admin@ctrl ansible]$ time ansible-playbook ./playbooks/jira.findalltasks.yml
[WARNING]: Collection community.general does not support Ansible version 2.16.3PLAY [Create JIRA ID 2872.56] *************************************************************************************************************************************************
TASK [Gathering Facts] ********************************************************************************************************************************************************
ok: [localhost]TASK [Create a new Jira issue] ************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "['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']"}PLAY RECAP ********************************************************************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Hello and welcome to the Community @clerambeau
The issue isn’t your JQL, but the search endpoint itself. Jira Cloud recently removed the legacy search path, which broke older versions of the community.general.jira module.
To fix this, upgrade your collection and set cloud: true for the search operation. If upgrading isn't an option, you’ll need to call the Jira REST API directly via the uri module. Your JQL syntax is correct; the module simply needs to be configured to use the modern Cloud-compatible endpoint.
Got it, so I need to update the python code in the Ansible module itself. That is what I was looking for. Thank you, @Arkadiusz Wroblewski
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.