I've been racking my brain around this for a while but feel like my scriptrunner knowledge just isn't good enough :)
My requirement is that when a user creates a request through the portal and they check box/set a value somewhere that an attachment becomes mandatory.
Now we have Scriptrunner so adding it as a Custom script validator on the create transition should do the trick.
Going back to the documentation, this works fine but only when I do it on the agent view. When it is submitted through the portal the form token is empty and thus it doesn't trigger.
Anybody got some ideas whether the form token needs to get capture differently when on the portal or just a different way of doing this?
I cannot make the field mandatory all the time as it is only under certain conditions required.
Thanks for any feedback!
Hi @Dirk Ronsmans I never used ScriptRunner for Jira Service Management workflows. An I only have some really old instance of Jira Software available.
But what if you add Validator to initial transition of the workflow and check attachments using https://docs.atlassian.com/software/jira/docs/api/7.6.1/com/atlassian/jira/issue/AttachmentManager.html#getAttachments-com.atlassian.jira.issue.Issue- ?
I know there are a lot of questions about attachments, portal requests, listeners etc. So I'm just guessing what could work :)
well that's indeed what I've done right now. I've added the validator to the create transition and that works great if you do it through the Agent view.
The moment you do this on the Portal it however doesn't seem to have a form token and it doesn't trigger.
So either I'm missing a method to capture that form token on the portal (which is then different from the agent/jira view) or it's a bug that it remains empty from the portal..
We often have questions from folks using Jira Service Management about the benefits to using Premium. Check out this video to learn how you can unlock even more value in our Premium plan. &nb...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events