Hi,
We are creating issues programmatically using a Forge app and invoking the Jira REST API with POST /rest/api/3/issue?notifyUsers=false.
Despite using notifyUsers=false, email notifications are still being triggered when the issue is created.
We have verified that there are no Jira Automation rules, workflow email post-functions, or custom notification rules configured for this project.
Is this expected behavior in Jira Cloud? If so, is there any supported API or app-level configuration to suppress email notifications for issue creation without relying on project-level configuration changes?
code Snippet
resolver.define("createTestCase", async ({ payload }) => {
try {
const { fields } = payload;
if (!fields) {
throw new Error("Invalid payload: fields missing");
}
const requestBody = {
fields: {
[fields.automatedKey]: fields.automatedVal,
[fields.platformKey]: fields.platformVal,
[fields.testStatusKey]: fields.testStatusVal,
[fields.testTypeKey]: fields.testTypeVal,
[fields.folderKey]: fields.folderVal,
[fields.requirementLinkKey]: fields.requirementLinkVal || "",
[fields.requirementIDKey]: fields.requirementIDVal || "",
[fields.requirementDescKey]: fields.requirementDescVal || "",
description: fields.description,
issuetype: fields.issuetype,
priority: fields.priority,
project: fields.project,
assignee: fields.assignee,
summary: fields.summary
}
};
const projectId = fields.project?.id;
if (!projectId) {
throw new Error("Project ID missing");
}
// Permission check
const auth = authorize();
const canCreate = await auth.onJiraProject(projectId) .canCreateIssues();
if (!canCreate) {
throw new Error("Forbidden: User cannot create issues in this project");
}
const response = await api.asApp().requestJira(
route`/rest/api/3/issue?notifyUsers=false`,
{
method: "POST",
headers: {
Accept: "application/json",
"Content-Type": "application/json"
},
body: JSON.stringify(requestBody)
}
);
if (!response.ok) {
const errorText = await response.text();
throw new Error(`Jira API error ${response.status}: ${errorText}`);
}
const data = await response.json();
return data;
} catch (error) {
console.error("Error in createTestCase:", error);
throw error;
}
});
Thanks in advance
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.