JIRA Behaviours- validators bound to issue opened in the background

my question is related to an issue concerning the current baheviours plugin. Maybe someone of you guys can help me out...

That's the problem:

If you set up a Behaviours action for "Project A" only, and you hit the "Create Issue" button and a "Project A" issue was on screen at the time, the behaviors will continue to fire even if you switch to "Project B" on the top of the create form. And the opposite is true. If you hit the "Create Issue" button while you are on a "Project B" issue, and then switch to "Project A" (where the Behaviour should now be triggered) nothing happens. If you are not at an issue page, it will work

It's not only the project the behaviour seems to be bound to the issue type that's been opened in the background. Looking at the source code the problem could be somewhere here:

I guess you would have to check if you're editing an issue (which should get the behaviour assigned to that particular issue type) or want to create a new issue in which the current issue id should be ignored.

3 answers

1 accepted

I think we ve identified the bug. The unwanted behaviour mix has been the result of some merging of existing and new "behaviours". We`re currently testing the fix but if you want we could provide the fix here?...

I know. I also commented on the issue but I hoped to get your attention in this forum...My problem is that I'm pressed for time... My current customer wants to go live with a system but not until this issue is fixed. That's why I've been asking all those questions about you maintaining the plugin etc. The second thought was to search for the bug and locally fixing it for now. I know that you don't have that much time. That's why I asked if you could point me to the right spot since I was just browsing the source randomly...

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

I would guess something is not getting cleared the second time the script is activated. There are one or two global variables (eg "behaviours" iirc) , I would try to clear them just inside the dialogContentReady block.

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

When I turn on firebug it becomes clear that the issue_id of the issue opened in the background gets pulled by the script and the validators.json is being addressed. Creating an issue from the dashboard the validatorsByPid.json is being addressed.... I've attached some screenshots:

Any ideas? By the way, is the clientvaljq.js the right spot to look for the bug?

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

no problem. Thanks for the response anyway. My customers doesn't plan to upgrade anytime soon and if inline editing is the killer for your plugin they probably won't use that feature at all. My problem is that I don't see any real alternative to validate fields in realtime...Any help (whenever you got time) is really being appreciated!

Thanks

Christian

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

Hi Jamie, with joy I noticed in early November, that you've decided to keep behaviours plugin alive. Since I don’t have any contact on you I’m addressing a question right here…

After fixing this bug () locally we now have two more suggestions that would be handled by a student, who is about to write a university paper about JIRA and your plugin

Firstly, we would like to have the possibility of inline-editing of the behaviors in the admin area, Secondly, an import / export function of the mappings and behaviors would be highly desirable.

The student could make these changes for us, but he would like to discuss them with you, so that these could be included in the update process. Since we‘re still using an older version of Jira (5.0.7) he would port and test his changes on the latest version of your plugin, if you agree. What do you think about this? If you want to get in contact with our student he’d be very happy to hear from you. His address is: J.Riedinger@decadis.de.

Merry Christmas and thanks for the plugin, Christian

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

In general happy enough to speak to anyone but it would be pretty brief, my spare time is going into groovy jql functions at the moment.

The mappings and behaviours are just properties so shd be easy to get out. Importing would involve mapping custom field ID to name, which is not so easy. Same problem with a general export/import in jira.

Why don't you pass on my email, it is "firstname at lastname @ gmail.com". PS: subsitute my first and last names... that seems to trip people up.

cheers, jamie

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...