Forge-connect app: questions about migration

Hello,

I am moving our connect-app to the forge platform
The manifest.yml file is:

---
connectModules:
  jira:lifecycle:
  - key: connect-lifecycle
    installed: /install
    uninstalled: /uninstall
  jira:jiraIssueTabPanels:
  - key: jtc-issue-tab
    name:
      value: TeamCity
    url: /jira/issue-tab?issueId=issue.id&issueKey=issue.key
    weight: 100
    conditions:
    - condition: has_project_permission
      params:
        permission: VIEW_DEV_TOOLS
  jira:jiraFeatureFlagInfoProvider:
    - key: feature-flag-info-provider
      name:
        value: TeamCity
      homeUrl: https://marketplace.atlassian.com/apps/1210766/teamcity-integration-for-jira
      logoUrl: https://ykarnilaev-jtc.eu.ngrok.io/assets/images/tc-logo-30x30.svg
      documentationUrl: https://docs.stiltsoft.com/display/public/JTC/TeamCity+Integration+for+JIRA
      actions: {}

  # 1. Why the posting builds requests return error message "Request is for an app that does not define the required jiraFeatureFlags module."
  jira:jiraBuildInfoProvider:
  - key: build-provider
    name:
      value: TeamCity
    homeUrl: https://marketplace.atlassian.com/apps/1210766/teamcity-integration-for-jira
    logoUrl: https://ykarnilaev-jtc.eu.ngrok.io/assets/images/tc-logo-30x30.svg
    documentationUrl: https://docs.stiltsoft.com/display/public/JTC/TeamCity+Integration+for+JIRA
    actions: {}
  jira:jiraDeploymentInfoProvider:
  - key: deployment-provider
    name:
      value: TeamCity
    homeUrl: https://marketplace.atlassian.com/apps/1210766/teamcity-integration-for-jira
    logoUrl: https://ykarnilaev-jtc.eu.ngrok.io/assets/images/tc-logo-30x30.svg
    documentationUrl: https://docs.stiltsoft.com/display/public/JTC/TeamCity+Integration+for+JIRA
  jira:configurePage:
  - key: teamcity-servers
    name:
      value: TeamCity Servers
    url: /admin/teamcity-servers/overview

  # 2. How can I describe the "jira:postInstallPage" module? forge deploy returns an error "RequestValidationError RequestValidationError: Schema validation error"
  #  jira:postInstallPage:
  #  - key: getting-started,
  #    name:
  #      value: TeamCity Servers
  #    url: /admin/getting-started
  jira:adminPages:
  - key: troubleshooting
    name:
      value: Troubleshooting
    url: /admin/troubleshooting/overview
    location: admin_plugins_menu/jtc-admin-section
  jira:dialogs:
  - key: teamcity-dialog
    url: /admin/teamcity-servers/add.dialog
    options:
      size: maximum
  jira:generalPages:
  - key: delete-teamcity-dialog
    name:
      value: Delete TeamCity
    url: /admin/teamcity-servers/delete.dialog
    location: none
  - key: reindex-teamcity-dialog
    name:
      value: Reindex TeamCity
    url: /admin/troubleshooting/reindex.dialog
    location: none
  jira:webSections:
  - key: jtc-admin-section
    location: admin_plugins_menu
    weight: 15
    name:
      value: TeamCity Configuration
  jira:webItems:
  - key: jtc-servers-admin-web-item
    name:
      value: TeamCity Servers
    url: /plugins/servlet/ac/com.stiltsoft.jira.teamcity/teamcity-servers
    location: admin_plugins_menu/jtc-admin-section
    context: product
    weight: 10
    target:
      type: page
    tooltip:
      value: TeamCity Servers
    conditions:
      - condition: user_is_admin
        invert: false
  - key: jtc-project-panel-link
    name:
      value: TeamCity
    location: jira.project.sidebar.plugins.navigation
    url: /projects/{project.key}?selectedItem=com.stiltsoft.jira.teamcity__jtc-project-panel-link
    context: product
    icon:
      width: 25
      height: 25
      url: /assets/images/app-icon-dark.svg
    conditions:
    - or:
      - condition: project_type
        params:
          projectTypeKey: software
      - condition: project_type
        params:
          projectTypeKey: service_desk
    - condition: has_project_permission
      params:
        permission: VIEW_DEV_TOOLS
  jira:webPanels:
  - key: jtc-project-web-panel
    
    # 3. How can I set url with resolved parameters like the following? /jira/project-tab?projectId={project.id}&projectKey={project.key}.
    #    When I use such request I get an error "Upsert Environment Request body is invalid. Details must match format "uri""
    url: /jira/project-tab?projectId={project.id}&projectKey=project.key
    location: com.stiltsoft.jira.teamcity__jtc-project-panel-link
    name:
      value: TeamCity Web Panel
    conditions:
    - condition: has_project_permission
      params:
        permission: VIEW_DEV_TOOLS
permissions:
  scopes:
  - read:connect-jira
  - write:connect-jira
  - delete:connect-jira
remotes:
- key: connect
  baseUrl: https://ykarnilaev-jtc.eu.ngrok.io
app:
  id: ari:cloud:ecosystem::app/3ac60cac-9448-4de2-8e26-67202b4a09ee
  connect:
    key: com.stiltsoft.jira.teamcity
    remote: connect

I’ve faced the following questions about this manifest:

  1. I’ve described the jira:jiraBuildInfoProvider module, but when the app is posting the builds requests to address https://host.atlassian.net/rest/builds/0.1/bulk, it receives 403 error with the following text
    Request is for an app that does not define the required jiraFeatureFlags module.
    
    How can I solve this error? I’ve already added the jira:jiraFeatureFlagInfoProvider module
  2. How can I describe the jira:postInstallPage module? Forge deploy returns an error
    RequestValidationError RequestValidationError: Schema validation error
    
    when I put the following module in the manifest:
      jira:postInstallPage:
      - key: getting-started,
        name:
          value: TeamCity Servers
        url: /admin/getting-started
    
  3. How can I set URL with parameters from project web-panel like the following?
    jira/project-tab?projectId={project.id}&projectKey={project.key}
    
    When I use such request I get an error
    Upsert Environment Request body is invalid. Details must match format "uri"
    
1 Like

Hello @jhazelwood,

Could you please help me in this thread as you helped me in the previous?

Hello @jhazelwood,

I changed the thread description and narrowed the questions about the migration to Forge.
I would be pleased if you got a chance to look them over.

Hi Yuri, we’ll try to investigate and get back to you on this soon; sorry about the delay!

Hi Yuri

Apologies for the delay

Regarding point 1 - we’re not sure what the problem is yet and need to look into it further.
Point 2 - there is a trailing comma in the key so getting rid of it will fix the validation issue
Point 3 - we need to make an update to our schema validation so that we can accept variables in the url

Sorry again for the delay in replying, we’ll keep you posted on the progress on the resolution for 1 and 3.

Regards
Varun

2 Likes

@VarunBhargava - Is there a Jira issue which I can track for #3 ?

Issue reported and fixed - ECOHELP-6674

Hello @jhazelwood, @VarunBhargava,

Is there any news on the first point?

I’ve described the jira:jiraBuildInfoProvider module, but when the app is posting the builds requests to address https://host.atlassian.net/rest/builds/0.1/bulk , it receives 403 error

I’ve tried to add the following permissions in the manifest:

- write:feature-flag:jira-software
- write:deployment:jira-software
- write:build:jira-software

but the error still exists, however error description has changed to the following:

[{"message":"Request is for an app that does not define the required jira module."}]

What kind of module do I need to define?

1 Like

The Atlassian team created a public ticket JSWCLOUD-23909 about dispatching builds and development data from Forge and Connect on Forge apps to Jira.

1 Like