Custom Listener with Jython

I'm totally lost--I might just need a pointer to relevant docs, because I can't find anything. Totally new to Jira and related products.

I've been given the task (and I'm not even sure I have all this right, so if something doesn't make sense please tell me) to fix a bug where when a ticket type is created as task but moved to an incident, the extended reporter information disappears. I'm not even sure where to begin this. I figured it would have something to do with the Script Runner/Script Console, but I can't even get a basic script to run. I tried selecting python (jython, version: 2.7.0, registered extensions: [py]) as the script engine and running the script:

def test():
  print 'this is a test'
  return 'test value'

test()

And I get `Result: no return value` which is odd, and the print statement gives nothing, which is not odd as I have no idea where I should be looking to see the print statement.

Any help with any or all of these issues would be greatly appreciated

1 answer

1 accepted

1 vote

>to fix a bug where when a ticket type is created as task but moved to an incident, the extended reporter information disappears

Roll back a bit - what's "extended reporter" info? If it's a Jira custom field, and you are using the standard built-in "move issue to new issue type" functionality, then the most likely problem is that the field is configured to be valid on Tasks, but not on Incidents, so when the issue type changes, the data vanishes. That could also be the problem if you're doing some sort of scripting too.

Could you confirm what that reporter info is, and how you are doing the move?

@NicBrough Got some more info:

When a ticket is created as an Incident or Simple Request, it includes fields such as Employee ID, Login, Company, Site, Cube and Phone (automatically, based on the Reporter). If it's created as anything else and then moved to an Incident, those fields are not present.

I found this... is it relevant or helpful at all? http://imgur.com/dFitrwT

Ah, possibly. It's a plugin providing an unusual type of custom field - one that digs right into a database and pulls information out of it.

However, I don't actually think the type of field is the issue here, I think it's the basic Jira configuration that says "when it's this project and issue type, show this field". In fact, I think the unusual custom field actually simplifies it, because it means we don't have to worry about data, the field should automatically appear when the configuration is correct.

I'm afraid field visibility can be a total PITA to a new (heck, and experienced) Jira admin. You'll need to work through Field configurations, screens and field contexts. It's a bit scary, but start with https://confluence.atlassian.com/display/JIRA/Configuring+Fields+and+Screens

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Posted yesterday in Jira

We want to know what Jira Service Desk apps you're using!

Hi Community! My name is Amir and I’m on the Jira Service Desk product marketing team at Atlassian. Our team would love to understand how you’re leveraging our ecosystem for Jira Service Desk. Wha...

40 views 0 5
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you