REST API endpoint /rest/api/2/project/{projectIdOrKey}/properties is not finding projects by projectId

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • None
    • Affects Version/s: 8.20.4
    • Component/s: REST API
    • None
    • 8.2
    • 1
    • Severity 3 - Minor

      Summary

      The REST API endpoint /rest/api/2/project/{projectIdOrKey}/properties is not finding projects by projectId, caused by a change on the regex for project ID, when it allows only numbers on the project key, the /project/<ProjectID>/properties API will not work with project ID, only with the project key.

      Steps to reproduce
      1. Change the application property jira.projectkey.pattern to accept only numbers as a project key (ie: ([A-Z_0-9][A-Z_0-9]+)).
      2. Call the API https://<instance>/rest/api/2/project/<ProjectID>/properties using any project.
      Expected Behaviour

      The project key property values, even if it is empty.

      Actual Results
      {"errorMessages":["The specified Project does not exist in the system."],"errors":{}}
      Notes
      • When using the project key, the API is able to find the projects.
      • The main concern with this API is that it is used by the add-on Tempo Timesheets to get data and it is not working due to this bug.

      Workaround:

      • Please make sure to revert the changes made to the jira.projectkey.pattern under Jira administration > System > General configuration and Advanced settings.

      It should be ([A-Z][A-Z0-9]+)

      • Make sure to not have alphanumeric project keys existing in your instance.

            Assignee:
            Unassigned
            Reporter:
            Devisree Gedda
            Votes:
            5 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: