Hi everyone,
I’m building a Forge app using the jira:uiModifications
module to modify the Global Issue Create (GIC) screen. Here’s what I’m doing:
- I hardcoded a
projectId
andissueTypeId
for a Team-managed project (Kanban board). - The UI Modification works perfectly for that setup — the
summary
field is prefilled as expected. - Then I changed the hardcoded
projectId
andissueTypeId
to point to a Company-managed project (also a Scrum board), but:- The modification does not apply to the Company-managed project.
- It still applies to the previous Team-managed project, even after I change the IDs and redeploy.
Index.js=>
const createUiModification = async (projectId, issueTypeId) => {
await api.asApp().requestJira(route/rest/api/3/uiModifications
, {
method: ‘POST’,
body: JSON.stringify({
name: ‘hello-world-ui-modification’,
contexts: [
{
projectId,
issueTypeId,
viewType: ‘GIC’
}
]
}),
headers: {
‘Content-Type’: ‘application/json’,
‘Accept’: ‘application/json’
}
});
};
Fronend/index.js=>
import { uiModificationsApi } from ‘@forge/jira-bridge’;
const { onInit } = uiModificationsApi;
onInit(({ api }) => {
api.getFieldById(‘summary’).setValue(‘Hello world Abhishek’);
}, () => [‘summary’]);