Hi Team,
I am trying to Hide System Field(Attachment) using getFieldbyName("Attachment") but it is not working. While the same working for custom fields only not for System field. Please suggest.
Script below
def What_type_of_access_request = getFieldById("customfield_32750")
def First_Name = getFieldById("customfield_32751")
def Last_Name = getFieldById("customfield_32752")
def Location = getFieldById("customfield_32753")
def Email_Address = getFieldById("customfield_32754")
def NW_Login_ID = getFieldById("customfield_32755")
def Employee_ID = getFieldById("customfield_32756")
def User_Supervisor_Name = getFieldById("customfield_32757")
def User_Supervisor_NW_ID = getFieldById("customfield_32758")
def User_Supervisor_manager = getFieldById("customfield_32759")
def NICE_Extn = getFieldById("customfield_32760")
def Attachment = getFieldByName("Attachment")
def verticalValue = What_type_of_access_request.getValue() as String
log.debug "Selected option: $verticalValue"
if (verticalValue== "Single User")
{
First_Name.setHidden(false);
Last_Name.setHidden(false);
Location.setHidden(false);
Email_Address.setHidden(false);
NW_Login_ID.setHidden(false);
Employee_ID.setHidden(false);
User_Supervisor_Name.setHidden(false);
User_Supervisor_NW_ID.setHidden(false);
User_Supervisor_manager.setHidden(false);
NICE_Extn.setHidden(false);
Attachment.setHidden(true);
}
else
{
First_Name.setHidden(true);
Last_Name.setHidden(true);
Location.setHidden(true);
Email_Address.setHidden(true);
NW_Login_ID.setHidden(true);
Employee_ID.setHidden(true);
User_Supervisor_Name.setHidden(true);
User_Supervisor_NW_ID.setHidden(true);
User_Supervisor_manager.setHidden(true);
NICE_Extn.setHidden(true);
Attachment.setHidden(false);
}
Hello, looks like attachements isn't really a Jira field like the others:
so behaviours can't affect it
Hi Ilya,
I have fixed this issue.
We can't use system field byname, we can use system field by ID only
Attachment id is "attachment".
def Attachment = getFieldById("attachment")
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hmh, i tried something similar myself, didnt get it to work, googled and found info above
guess its outdated, now that i tested it - it really works
good for you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hmm... I was also searching on google but not get proper solution.
I asked Adaptivsit team for the solution, they suggest me to use in this way.
I tested and it worked for me as well. Custom field works ByName but system field works onlys with ID.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Vikrant Yadav
ID is working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.