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

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low (View bug fix roadmap)
    • None
    • 8.20.4
    • REST API
    • None

      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.

            [JSWSERVER-21574] REST API endpoint /rest/api/2/project/{projectIdOrKey}/properties is not finding projects by projectId

            Stasiu made changes -
            Status Original: Needs Triage [ 10030 ] New: Gathering Impact [ 12072 ]
            Bugfix Automation Bot made changes -
            Introduced in Version New: 8.2
            Devisree Gedda made changes -
            Description Original: h5. 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.
            h5. Steps to reproduce
             # Change the application property {{jira.projectkey.pattern}} to accept only numbers as a project key (ie: ([A-Z_0-9][A-Z_0-9]+)).
             # Call the API https://&lt;instance&gt;/rest/api/2/project/&lt;ProjectID&gt;/properties using any project.

            h5. Expected Behaviour

            The project key property values, even if it is empty.
            h5. Actual Results
            {code:java}
            {"errorMessages":["The specified Project does not exist in the system."],"errors":{}}{code}
            h5. 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.
            New: h5. 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.
            h5. Steps to reproduce
             # Change the application property {{jira.projectkey.pattern}} to accept only numbers as a project key (ie: ([A-Z_0-9][A-Z_0-9]+)).
             # Call the API https://&lt;instance&gt;/rest/api/2/project/&lt;ProjectID&gt;/properties using any project.

            h5. Expected Behaviour

            The project key property values, even if it is empty.
            h5. Actual Results
            {code:java}
            {"errorMessages":["The specified Project does not exist in the system."],"errors":{}}{code}
            h5. 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.
            Devisree Gedda made changes -
            Security Original: Reporter and Atlassian Staff [ 10751 ]
            Devisree Gedda made changes -
            Labels Original: support-escalation
            Devisree Gedda made changes -
            Assignee Original: Zbyszko Papierski [ zpapierski ]
            Devisree Gedda made changes -
            Reporter Original: Rodrigo B. [ rbecker ] New: Devisree Gedda [ dgedda@atlassian.com ]
            Devisree Gedda made changes -
            Component/s Original: Ecosystem [ 53294 ]
            Component/s New: REST API [ 41893 ]
            Key Original: JRACLOUD-80238 New: JSWSERVER-21574
            Symptom Severity Original: Severity 2 - Major [ 14431 ] New: Severity 3 - Minor [ 15832 ]
            Affects Version/s New: 8.20.4 [ 98191 ]
            Project Original: Jira Cloud [ 18514 ] New: Jira Software Server and Data Center [ 12200 ]
            Devisree Gedda made changes -
            Link New: This issue is cloned from JRACLOUD-67363 [ JRACLOUD-67363 ]
            Devisree Gedda created issue -

              Unassigned Unassigned
              dgedda@atlassian.com Devisree Gedda
              Affected customers:
              5 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated: