jira attchment validator

Fernando del Río November 9, 2016

Hi guys

 

I need required attachment when issue.type is"XXXX" (created ticket)

 

Help Please

 

1 answer

1 vote
蘇子堯_Klus_ November 9, 2016

hey,man

if you require attachment when issue.type is "Bug"

try this in workflow validator

when your type is bug

need .pdf file or .jpg file

if(issue.issueType.name == 'Bug'){
attachmentManager.getAttachments(issue).any{it.filename.endsWith('.pdf') || it.filename.endsWith('.jpg')}
}
else{
    return true
}
Fernando del Río November 10, 2016

Woo This Work for me

 

Thk!!!!!

Fernando del Río November 10, 2016

Hi Klus,

 

when add pdf and press transition button  show error (message: add PDF Please)

 

help please 

蘇子堯_Klus_ November 10, 2016

add your message here

message.jpg

蘇子堯_Klus_ November 10, 2016

put the code to the "condition" field

then add your message to "Error Message" field

Fernando del Río November 11, 2016

Hi Klus,

 

I did that,

At the moment of creating the ticket (create issue screen) I add the PDF and the Errror is triggered and if I do not add the error it also fires.

Apparently you can not validate on the ticket creation screen

 

THK

Faiza Kazmi June 20, 2019

 

in my scenario i need to attach 3 attachment with the following  name while creating issue 

1-BRD

2-CMF

3-RFI

there should be a mechanism that the system should read the 3 file names if uploaded and then create the transition else it should throw an error that the attachments are incomplete.

Suggest an answer

Log in or Sign up to answer