Transition fields gets empty but workflow having manatory field
Asked by Dhurgeswari:

I am using issuekey through getting transition fields .but here I am getting empty fields but workflow having manatory field.

My Request like below, {#toc-hId--327424511}
--------------------------------------------

const getTransitionRequiredFields = async (issueKey, transitionId) =\> {
const config = {};
config.issueFields = await storage.get('issueFields');
config.configData = await storage.get('configData');
try {
const response = await api.asApp().requestJira(route`/rest/api/3/issue/${issueKey}/transitions?expand=transitions.fields&transistionId=31`,
);
const data = await response.json();
console.log("getTransitionRequiredFields:: ",data);
const transition = data.transitions.find(t =\> t.id === transitionId);
if (transition \&\& transition.fields) {
console.log('Mandatory fields for the Done transition:', transition.fields);
return transition.fields;
} else {
console.log('No mandatory fields for the Done transition.');
return {};
}
} catch (error) {
console.error('Error fetching transition fields:', error);
}
}; {#toc-hId--2134878974}
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

**Response like below**   
INFO 13:07:57.107 6188a077-7285-4d25-b126-59450a9fddbb  
getTransitionRequiredFields::  
{  
expand: 'transitions',  
transitions: \[  
{  
id: '11',  
name: 'To Do',  
to: \[Object\],  
hasScreen: false,  
isGlobal: true,  
isInitial: false,  
isAvailable: true,  
isConditional: false,  
fields: {},  
isLooped: false  
},  
{  
id: '21',  
name: 'In Progress',  
to: \[Object\],  
hasScreen: false,  
isGlobal: true,  
isInitial: false,  
isAvailable: true,  
isConditional: false,  
fields: {},  
isLooped: false  
},  
{  
id: '31',  
name: 'Done',  
to: \[Object\],  
hasScreen: false,  
isGlobal: true,  
isInitial: false,  
isAvailable: true,  
isConditional: false,  
fields: {},  
isLooped: false  
}  
\]  
}  
INFO 13:07:57.116 6188a077-7285-4d25-b126-59450a9fddbb Mandatory fields for the Done transition: {}  
but my project throw manatory field alert while moving to done transistion  

![image](https://global.discourse-cdn.com/atlassiandeveloper/optimized/3X/c/2/c233b97914690c710e86721a0657cdf16f51bece_2_690x289.png)


Answers:
author: Anandhi Arumugam
body: Hi [@Dhurgeswari](/t5/user/viewprofilepage/user-id/5597385) The transition fields will show you the list of fields present on a transition screen (a little pop up you get when you change status to be able to fill in details on the field). It looks like you don't have a transition screen here, but the field is made mandatory on a validator or somewhere. Please check the configurations. Hope this helps!


Tags: cloud

jira-cloud