{
    "key": "pl.com.tt.jira.plugin.theschedulerpro",
    "baseUrl": "https://the-scheduler.ttae.com.pl",
    "enableLicensing": true,
    "description": "The Scheduler allows you to automate the process of creating recurring tasks in Jira. Using our add-on, you define the issue template once, select how often it should be created, and that's it! The Scheduler will create the issues for you.",
    "name": "The Scheduler",
    "apiVersion": 2,
    "authentication": {
        "type": "jwt"
    },
    "vendor": {
        "name": "Transition Technologies PSC Sp. z o.o.",
        "url": "https://ttpsc.com/en/atlassian/ttpsc-apps/"
    },
    "lifecycle": {
        "uninstalled": "/jira-hook/uninstalled",
        "installed": "/jira-hook/installed",
        "_dare-migration": "/jira-hook/data-residency-migration"
    },
    "_regionBaseUrls": {
        "US": "https://the-scheduler.ttae.com.pl"
    },
    "modules": {
        "webhooks": [
            {
                "event": "project_deleted",
                "url": "/jira-hook/projects/{project.id}/delete-events"
            },
            {
                "event": "connect_addon_disabled",
                "url": "/jira-hook/disabled-events"

            },
            {
                "event": "connect_addon_enabled",
                "url": "/jira-hook/enabled-events"
            }
        ],
        "dialogs": [
            {
                "url": "/jira-template/browse/{issue.key}/schedule-this-issue?projectId={project.id}&projectKey={project.key}&descriptorVersion=2",
                "options": {
                    "size": "large",
                    "chrome": false
                },
                "key": "wizard-create-scheduled-issue"
            },
            {
                "url": "/jira-template/scheduled-job-upcoming-executions?projectId={project.id}&descriptorVersion=2",
                "options": {
                    "size": "x-large",
                    "header": {
                        "value": "Scheduled Issue upcoming executions"
                    }
                },
                "key": "scheduled-job-upcoming-executions"
            },
            {
                "url": "/jira-template/global-create-edit-calendar-date?descriptorVersion=2",
                "options": {},
                "key": "global-create-edit-calendar-date"
            },
            {
                "url": "/jira-template/project-create-edit-calendar-date/{project.id}?descriptorVersion=2",
                "options": {},
                "key": "project-create-edit-calendar-date"
            },
            {
                "url": "/jira-template/global-create-edit-calendar?projectId={project.id}&descriptorVersion=2",
                "options": {},
                "key": "global-create-edit-calendar"
            },
            {
                "url": "/jira-template/project-create-edit-calendar/{project.id}?descriptorVersion=2",
                "options": {},
                "key": "project-create-edit-calendar"
            }
        ],
        "postInstallPage": {
            "url": "/jira-template/getting-started_page?descriptorVersion=2",
            "name": {
                "value": "Get Started"
            },
            "key": "get-started"
        },
        "jiraProjectAdminTabPanels": [
            {
                "location": "projectgroup-scheduler-section",
                "weight": 200,
                "url": "/jira-template/project-notifications/{project.id}?descriptorVersion=2",
                "name": {
                    "value": "Scheduler Notifications"
                },
                "key": "scheduler-notifications-tab",
                "conditions": [
                    {
                        "condition": "addon_is_licensed"
                    }
                ]
            },
            {
                "location": "projectgroup-scheduler-section",
                "weight": 200,
                "url": "/jira-template/project-calendars-preview/{project.id}?descriptorVersion=2",
                "name": {
                    "value": "Scheduler Project Calendars"
                },
                "key": "scheduler-project-calendars-tab",
                "conditions": [
                    {
                        "condition": "addon_is_licensed"
                    }
                ]
            }
        ],
        "jiraProjectPages": [
            {
                "url": "/jira-template/projects/{project.id}/scheduled-issues?descriptorVersion=2&projectKey={project.key}&selectedSi={ac.selectedSi}",
                "iconUrl": "/icons/scheduler-jira-project-pages-icon.svg",
                "weight": 100,
                "name": {
                    "value": "Scheduled Issues"
                },
                "key": "project-scheduled-issues",
                "conditions": [
                    {
                        "condition": "user_is_logged_in"
                    },
                    {
                        "or": [
                            {
                                "condition": "has_global_permission",
                                "params": {
                                    "permission": "ADMINISTER"
                                }
                            },
                            {
                                "condition": "has_project_permission",
                                "params": {
                                    "permission": "ADMINISTER_PROJECTS"
                                }
                            },
                            {
                                "and": [
                                    {
                                        "condition": "has_project_permission",
                                        "params": {
                                            "permission": "CREATE_ISSUES"
                                        }
                                    },
                                    {
                                        "condition": "has_global_permission",
                                        "params": {
                                            "permission": "pl.com.tt.jira.plugin.theschedulerpro__the-scheduler-access-permission"
                                        }
                                    },
                                    {
                                        "condition": "has_project_permission",
                                        "params": {
                                            "permission": "pl.com.tt.jira.plugin.theschedulerpro__the-scheduler-use-permission"
                                        }
                                    },
                                    {
                                        "condition": "has_project_permission",
                                        "params": {
                                            "permission": "BROWSE_PROJECTS"
                                        }
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }
        ],
        "adminPages": [
            {
                "location": "admin_plugins_menu/sys-SI-WebSection",
                "weight": 200,
                "url": "/jira-template/getting-started_page?descriptorVersion=2",
                "name": {
                    "value": "Get Started"
                },
                "key": "sys-get-started"
            },
            {
                "location": "admin_plugins_menu/sys-SI-WebSection",
                "weight": 200,
                "url": "/jira-template/global-scheduled_issues?descriptorVersion=2",
                "name": {
                    "value": "Statistics"
                },
                "key": "sys-SI-items",
                "conditions": [
                    {
                        "condition": "addon_is_licensed"
                    }
                ]
            },
            {
                "location": "admin_plugins_menu/sys-SI-WebSection",
                "weight": 200,
                "url": "/jira-template/global-triggers?descriptorVersion=2",
                "name": {
                    "value": "Global Triggers"
                },
                "key": "global-triggers",
                "conditions": [
                    {
                        "condition": "addon_is_licensed"
                    }
                ]
            },
            {
                "location": "admin_plugins_menu/sys-SI-WebSection",
                "weight": 200,
                "url": "/jira-template/global-calendars-preview?descriptorVersion=2",
                "name": {
                    "value": "Global Calendars"
                },
                "key": "sys-global-calendars",
                "conditions": [
                    {
                        "condition": "addon_is_licensed"
                    }
                ]
            },
            {
                "location": "admin_plugins_menu/sys-SI-WebSection",
                "weight": 200,
                "url": "/jira-template/failed-executions?descriptorVersion=2",
                "name": {
                    "value": "Failed Executions"
                },
                "key": "sys-failed-executions",
                "conditions": [
                    {
                        "condition": "addon_is_licensed"
                    }
                ]
            },
            {
                "location": "admin_plugins_menu/sys-SI-WebSection",
                "weight": 200,
                "url": "/jira-template/migrations-dashboard?descriptorVersion=2&projectKey={project.key}&isSiteAdmin={condition.user_is_admin}",
                "name": {
                    "value": "Migrations Dashboard"
                },
                "key": "sys-migrations-dashboard"
            },
            {
                "location": "admin_plugins_menu/sys-SI-WebSection",
                "weight": 200,
                "url": "/jira-template/global-scheduler-settings?descriptorVersion=2",
                "name": {
                    "value": "Settings"
                },
                "key": "sys-scheduler-settings",
                "conditions": [
                    {
                        "condition": "addon_is_licensed"
                    }
                ]
            }
        ],
        "webItems": [
            {
                "url": "/jira-template/browse/{issue.key}/schedule-this-issue?projectId={project.id}&projectKey={project.key}&descriptorVersion=2",
                "location": "operations-top-level",
                "context": "addon",
                "weight": 200,
                "target": {
                    "type": "dialog",
                    "options": {
                        "chrome": false,
                        "size": "large"
                    }
                },
                "key": "schedule-this-issue",
                "name": {
                    "value": "Schedule issue"
                },
                "conditions": [
                    {
                        "condition": "addon_is_licensed"
                    },
                    {
                        "condition": "has_project_permission",
                        "params": {
                            "permission": "CREATE_ISSUES"
                        }
                    },
                    {
                        "or": [
                            {
                                "condition": "has_project_permission",
                                "params": {
                                    "permission": "ADMINISTER_PROJECTS"
                                }
                            },
                            {
                                "condition": "has_global_permission",
                                "params": {
                                    "permission": "ADMINISTER"
                                }
                            },
                            {
                                "and": [
                                    {
                                        "condition": "has_project_permission",
                                        "params": {
                                            "permission": "pl.com.tt.jira.plugin.theschedulerpro__the-scheduler-use-permission"
                                        }
                                    },
                                    {
                                        "condition": "has_global_permission",
                                        "params": {
                                            "permission": "pl.com.tt.jira.plugin.theschedulerpro__the-scheduler-access-permission"
                                        }
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }
        ],
        "webSections": [
            {
                "location": "admin_plugins_menu",
                "weight": 50,
                "name": {
                    "value": "The Scheduler"
                },
                "key": "sys-SI-WebSection"
            },
            {
                "location": "atl.jira.proj.config",
                "weight": 50,
                "name": {
                    "value": " "
                },
                "key": "projectgroup-scheduler-section"
            }
        ],
        "jiraProjectPermissions": [
            {
                "description": {
                    "value": "Granting this permission allows users to create, edit, view, and delete Scheduled Issues. Project and Global Administrators are granted it by default - to ensure that the app can be used and managed. Global permission \"The Scheduler: Access\" is required."
                },
                "category": "projects",
                "name": {
                    "value": "The Scheduler: Use"
                },
                "key": "the-scheduler-use-permission"
            },
            {
                "description": {
                    "value": "Granting this permission allows users to create scheduled issue with security level, even if user doesn’t have permission to create scheduled issue with security level. Global permission \"The Scheduler: Access\" and project permission \"The Scheduler: Use\" are required."
                },
                "category": "projects",
                "name": {
                    "value": "The Scheduler: Set issue security level"
                },
                "key": "the-scheduler-set-issue-security-level-permission"
            }
        ],
        "jiraGlobalPermissions": [
            {
                "description": {
                    "value": "This global permission is required for users to access the app on global level. Project and Global Administrators are granted this by default. This permission is like an app wrapper, on project level users are required to have permission \"The Scheduler: Use\"."
                },
                "defaultGrants": [
                    "all"
                ],
                "name": {
                    "value": "The Scheduler: Access"
                },
                "key": "the-scheduler-access-permission"
            }
        ],
        "jiraEntityProperties": [
            {
                "key": "jira-issue-tsp-indexing",
                "name": {
                    "value": "Tsp index"
                },
                "entityType": "issue",
                "keyConfigurations": [
                    {
                        "propertyKey": "thescheduler",
                        "extractions": [
                            {
                                "objectName": "id",
                                "type": "string"
                            },
                            {
                                "objectName": "executionDateTime",
                                "type": "string"
                            }
                        ]
                    }
                ]
            },
            {
                "key": "jira-subtask-tsp-indexing",
                "name": {
                    "value": "Tsp index subtasks"
                },
                "entityType": "issue",
                "keyConfigurations": [
                    {
                        "propertyKey": "tsp-subtask-id",
                        "extractions": [
                            {
                                "objectName": "sjId",
                                "type": "string"
                            },
                            {
                                "objectName": "executionDateTime",
                                "type": "string"
                            }
                        ]
                    }
                ]
            }
        ],
        "jiraIssueContexts": [
            {
                "icon": {
                    "width": 24,
                    "height": 24,
                    "url": "/icons/logo.png"
                },
                "content": {
                    "type": "label",
                    "label": {
                        "value": "Check template and next occurrence"
                    }
                },
                "target": {
                    "type": "web_panel",
                    "url": "/jira-template/issue-created-by-scheduler?issueKey={issue.key}&projectId={project.id}&descriptorVersion=2"
                },
                "name": {
                    "value": "The Scheduler"
                },
                "key": "issue-created-by-scheduler-issue-context",
                "conditions": [
                    {
                        "or": [
                            {
                                "condition": "entity_property_exists",
                                "params": {
                                    "entity": "issue",
                                    "propertyKey": "thescheduler"
                                }
                            },
                            {
                                "condition": "entity_property_exists",
                                "params": {
                                    "entity": "issue",
                                    "propertyKey": "tsp-subtask-id"
                                }
                            }
                        ]
                    }
                ]
            }
        ]
    },
    "apiMigrations": {
        "gdpr": true,
        "context-qsh": true,
        "signed-install": true
    },
    "scopes": [
        "READ",
        "PROJECT_ADMIN",
        "ADMIN"
    ]
}
