Hello,
I’m building a Forge App that should invoke the function when user updates their display name in the service desk portal (<base_url>/servicedesk/customer/user/profile). I’m running local development with tunneling and while avi:jira:created:user is being triggered on user signing up to the portal, the avi:jira:updated:user is not triggered - doesn’t matter if it’s done through service desk directly, or profile is modified from site admin.
I’ve tried running forge deploy and forge install –upgrade, then rerunning the tunnel, but every time results are the same - create trigger works, update trigger doesn’t.
I’ve tried different combinations of permissions.scopes - both classic and granular, nothing changed (followed by deploy and install of course).
I’m using development environment, and the app “DEV” environment is installed in the Jira I was trying these actions on.
manifest.yml
modules:
trigger:
- key: user-created-trigger
function: user-created-handler
events:
- avi:jira:created:user
filter:
ignoreSelf: true
- key: user-profile-updated-trigger
function: user-updated-handler
events:
- avi:jira:updated:user'
function:
- key: user-created-handler
handler: index.handleCreatedUser
- key: user-updated-handler
handler: index.handleUpdatedUser
permissions:
scopes:
- read:jira-user
- read:application-role:jira
- read:group:jira
- read:user:jira
- read:avatar:jira
I have a single src/index.js file with both handlers being defined:
async function handleCreatedUser(value) {
console.log("handleCreatedUser", value);
return {
body: `{"payload": "Automation OK"}`,
headers: {
"Content-Type": ["application/json"],
"X-Request-Id": ["example"]
},
statusCode: 200,
statusText: "OK"
};
}
async function handleUpdatedUser(value) {
console.log("handleUpdatedUser", value);
return {
body: `{"payload": "Automation OK"}`,
headers: {
"Content-Type": ["application/json"],
"X-Request-Id": ["example"]
},
statusCode: 200,
statusText: "OK"
};
}
Thanks for any help in advance.