Hi there,
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,
Did you find any solution, i am also facing same issue form token is empy for portsl
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 :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Martin Bayer [MoroSystems, s.r.o.] ,
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..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm stuck on the same problem, formToken is null from Portal and thus nothing can be checked. :(
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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.