Uploaded image for project: 'Jira Software Data Center'
  1. Jira Software Data Center
  2. JSWSERVER-21574

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 8.20.4
    • REST API
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dgedda@atlassian.com Devisree Gedda
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: