I have a Stagil Table custom field. I would like to be able to view the items entered in the table in order to do validation on that information.
It would be good enough for me to get the raw XML or whatever format they use behind the scenes, I just can't figure out how to access the data.
In Scriptrunner, if I try to locate the value of the field similar to how I access other custom field values, it ends up being null. Any hints as to what I might be doing wrong?
def issueManager = ComponentAccessor.getIssueManager()
def issue = issueManager.getIssueObject("ASDF-24")
def otherList = customFieldManager.getCustomFieldObjectsByName("NewTableField")
def otherValue = issue.getCustomFieldValue(otherList.first())
if(otherValue) {
log.info("it's not null!")
} else {
log.info("it's null!")
}
As a follow-up, this is something not currently supported, but their development team is working on. Eta mid September.
Their newest Administrator's Guide now exposes API calls for directly working with data inside the tables.
https://stagil.atlassian.net/wiki/spaces/STJ/pages/376799265/Administrators+Guide
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Try this one:
def issueManager = ComponentAccessor.getIssueManager()
def issue = issueManager.getIssueObject("ASDF-24")
def otherList = customFieldManager.getCustomFieldObjectsByName("NewTableField")
def otherValue = otherList.first().getValue(issue)
if(otherValue) {
log.info("it's not null!")
} else {
log.info("it's null!")
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nope, still doesn't work.
I'm going to open a support request with Stagil.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Taylor Chase
I would recommend you to raise request in STAGIL support.
Because your code correct and must work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ok. I wasn't sure if a custom field type has any kind of weird requirements I didn't know about :)
I'll go ahead with a service request.
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.