Hi,
I have sub-tasks in my jira instance to allow my customer to log more than one payment and avoid making multiple fields.
I am still learning scriptrunner and using the tutorial on the site create my first scripted field.
It works great until I get to the two customfields in my sub-task payment issue type: custom field payment because it is a numeric field and a single select list of payment sources. The output is this on my parent issue:
I am not sure what you are trying to achieve here, but the table with empty cells suggests your script is not presenting any data to go into the cells, probably because it is failing to read it (that's the usual culprit behind an empty result).
I can't really help without a better understanding of what you are trying to do (a statement like "add up some numbers on all the subtasks of an issue and show it on the parent issue" would be great ), or seeing what your script says at the moment.
Apologies for incomplete info and thank you for your help.
I created a sub-task that holds the payment in two custom fields: Payment Type and Payment Amount. The header in the table are the same of the fields. I don't know how to build the code to pull the data from those custom fields on the sub-task into the table on the "parent linked issue". So yes I want to pull the number fields that live only in that subtask into the table. (Let me know if I am unclear)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, I think that has cleared up all the bits I was not sure of!
So, this library entry is a little bit mis-named - it says "from JQL" but doesn't use any JQL for Server or DC, as it doesn't need to on them. https://library.adaptavist.com/entity/calculate-the-sum-of-fields-from-multiple-issues-from-a-jql-query
It is however, a script for a scripted field that reads a number from each sub-task, adds them together and puts the result out as the scripted field output.
It is not quite what you want, but it does show you how to grab numeric data from a set of subtasks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I review the snippet--- I am still learning so add to this thread if I need more assistance. Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nic, I need your experience and wisdom.
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.