i could use this routine getIssueFields to get fields of the parent task by using parent.key as parameter, but what should i use to access the fields in current issue, im coding SIL for live fields by the way.
fields = getIssueFields(parent.key);
vRetVal = fields["reporter"];
You can access the current issue fields by using the standard variables defined in SIL.
For example to retrieve the reporter for current issue you just have to use the standard variable reporter. For custom fields, you can access them either by id (eg. customfield_xxxxx) or by name.
For more details check this documentation page: http://confluence.kepler-rominfo.com/display/SIL/Variable+Resolution
Note that standard variables can be used without explicitly referencing the issue only when the script has an issue context, so not on create issue for example.
So, if you want to access some fields values on the create issue screen also, you have to use the live fields lfInstantHook routine: http://confluence.kepler-rominfo.com/display/JJUPIN/lfInstantHook
You have to provide the list of fields that you are interested in and a hook script in which you can access the value for these fields, using argv["<field_name>"].
If you want to get some field values from the screen after certain events (eg. changed, keyup), you should use the lfWatch routine for that field: http://confluence.kepler-rominfo.com/display/JJUPIN/lfWatch
Hope this helps.
This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.Read more
Atlas Camp is our developer event which will take place in Barcelona, Spain from the 6th -7th of September . This is a great opportunity to meet other developers and get n...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs