Hi,
I am trying to create a Atlassian Forge app to make fields mandatory on Create(GIC) and transition screens using UI Modifications module.
I am able to make fields mandatory on Global Issue Create screen by registering the context for specific project, issue type and viewType. I have added a screen during a transition to Request Input and if I try to add context for IssueTransition viewType, the fields are not getting mandated on transition screen and not able to see any console logs as well.
Can anyone please guide me on How to make this work? How to make fields mandatory or hidden on Issue transition screens in Jira cloud using Forge?
Thanks & regards,
Preethi H R
Could you share which fields you are trying to make required during the Issue Transition?
You can see the list of fields that support the “required” property here:
UI modifications
Also, can you confirm that you are using the new Issue Transition view? UI Modifications are only supported in the new Issue Transition experience.
Hi Abhishek,
I am trying to make Labels and Story points(Custom field) as mandatory on transition screen.
Can you please let me know how to check if I am using new Transition view?
Thanks for sharing the fields.
Right now, UIM for Issue Transition does not support a Story Points custom field.
For labels, I checked and the required api is working as expected. If you are still seeing issues with labels, could you please share one of the following?
-
the code snippet you are using, or
-
a short video showing the problem, or
-
the site URL where you are testing this
This will help us understand and debug the issue.
I am sharing the index.js file code.
index file.txt (1.3 KB)
Below is the webtrigger file code which is getting used for calling UI modifications api for context setting.
const TARGET_PROJECT_ID = ‘10033’; //ACP Project
const TARGET_ISSUE_TYPE_IDS = [‘10000’, ‘10006’]; //Story and Epic issue type
const TARGET_VIEW_TYPES = [‘GIC’, ‘IssueView’, ‘IssueTransition’];
const HARD_CODED_CONTEXTS = TARGET_ISSUE_TYPE_IDS.flatMap((issueTypeId) =>
TARGET_VIEW_TYPES.map((viewType) => ({
projectId: TARGET_PROJECT_ID,
issueTypeId,
viewType,
}))
);
Below are the screenshots explaining the scenario, I have attached the workflow to my ACP Project
The workflow is edited to “show a screen” for Any → In Progress transition.
Now on issue screen if I am transitioning Story issue type from To Do → In Progress, it is showing the transition screen.
But labels field is not getting mandatory.
I think I understand the issue now. It is happening because you’re trying to open the old issue transition modal. To use the new modal, please go to General Settings and turn on New work transition experience.
Hi Abhishek,
Yeah if I switch to New work transition experience, I see Labels field is getting mandatory. It’s working. Thank you very much for your Support.