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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

77 views 0 5
Read article

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