Hi gang,
I could use some advice. I have a script that will create a ticket as part of a post-function. It works great except for one bit: the transition has some additional fields to fill out -- and that information is supposed to be passed to the new ticket.
I notice that when I try to copy the values from the original ticket, the information is stale. So I am assuming I need to use something to look at the httprequest itself? So I was looking at examples from webwork.action.ActionContext -- I see posts online about how to leverage this library to verify or add links to other issues as part of a transition -- or require attachments be added during a transition. But what I am having difficulty finding is how to parse the request ... or I guess more specifically the formToken. I can see that the formToken will have information like this:
formToken=[Ljava.lang.String;@2873b4d, customfield_14201=[Ljava.lang.String;@7cd9853, customfield_14202=[Ljava.lang.String;@6f57345d, commentProperty=[Ljava.lang.String;@292fe461, comment=[Ljava.lang.String;@1249ef5a}
.. but how do I get the values stored in customfield_14201 and 14202?
Anyway -- any tips would be much appreciated. If anyone is curious why I am not using the handy ScriptRunner built-in that does this, it's because I am working on a script that can be called from any project transition that calls it. I plan to have the script live on the application server. It's part of some updates we are making to Incident management, that depending on what you enter in the transition screen, it will spin up and link issues as appropriate.
Thanks again!