I'm working on a workflow that will allow tasks to get passed down an echelon for action, but only one level at a time, giving leadership the chance to edit/respond to tasks before it goes all the way down to work centers, but I'm getting kinda stuck when it comes to attachments. I know I can copy all the attachments in the post-script, but I'd like to give users the option to edit the attachments before passing them along: enter the customfield "Apwide File Field". Currently I'm using scriptrunner to pre-fill dummy fields on the transition screen, leaving the original issue un-changed. Here's an example screen capture:
I've managed to set the "Tasker Description for X" fields using Scriptrunner's Behaviors and this:
However the Apwide Attachment Field ("Attachments for Units") is being a PITA. Below is the closest solution I've found, but it doesn't actually update the form, it updates the field in the background, so I have to go to transition the task and hit cancel, and then when I go to transition again it updates the form value.
Edit: I forgot to mention, but it's also only copying one attachment (the last one based on an alphanumeric scale running from 0-z). Haven't really started to deal with that yet, but any tips would be appreciated :)
Thanks for your question about our File Field Jira App.
You will soon get an answer from one of our File Field expert.
Have a nice day,
David
You can let your File Field experts know I've figured it out. I used a ScriptRunner "Custom script condition" to copy everything over to the custom fields immediately *before* the transition starts. From there I loop through the attachments adding them to fileId before finally adding it to the File Field. Code below:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.