Hi All,
Need help to implement transition validation with JIRA MISC WORKFLOW EXTENSIONS
Please share your thoughts on this how to implement this? Also, https://community.atlassian.com/t5/Jira-Software-questions/Use-Case-Verify-Attachment-Type-When-Transitioning/qaq-p/1631128 I tried this but this is limited to transition screen and this is not working for me
Any help would be appreciated and TIA
Hi @Ravi Kumar Boddu
You can use a Build-your-own Validator for this. The Jira expression should be something like:
issue.attachments && issue.attachments.some(att => att.filename.toLowerCase() == "some file.xls" && att.mimeType == "some mime type")
You'll need to figure out the exact mime type by adding the desired file to an issue and then testing the following expression against that issue:
issue.attachments[0].mimeType
@David Fischer - Please find the error details
Thanks David for the suggestion , this validation limited to the transition but Is there any away that we can check whether the ticket already has attachment of specific file while doing certain transition.
I'm sorry but I didn't understand your question. Can you please elaborate?
@David Fischer - Adding the suggested validation in the transition is limited to the transition screen and it checks whether the specific file (name and format) is attached to the screen or not to move forward with the transition.
However, I want have a additional condition to check whether the file is already attached to the ticket or not then enforce the user to attach the file during the transition if not already present in the attachments else allow the transition.
@David Fischer This has helped me with a similar dilemma. However, I'm wondering how I would modify the JQL to include more than one document type with the same name i.e. Document.xlsx or Document.docx. I'm currently not utilizing the portion of the script below
&& att.mimeType == "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet")
I was actually able to figure this out, but I'm having another issue altogether because of the validator. To be continued...
It looks like you're new here. Sign in or register to get started.