Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Error QuickCreateIssue when custom project-tabpanel added.

Kateryna January 28, 2014

I add to my plugin project-tabpanel:
<project-tabpanel key="test-panel" name="Test Panel"
class="ru.my.jira.plugins.TestPanel">
<description>Test project panel.</description>
<label>Test</lanel>
<order>155</order>
<resource type="velocity" name="view" location="templates/testProjectTabPanel.vm"/>
</project-tabpanel>

And now, if i create issue (QuickCreateIssue) in project page http://localhost:8090/browse/TESTI get javascript error:

"TypeError: tabToCompare is null" in this script http://localhost:8090/s/ru_RUmyiiur-1988229788/6106/3/1.0/_/download/batch/jira.webresources:browseproject/jira.webresources:browseproject.js

In this script I find:

getTab = function (url) {
var tabRegExp = /selectedTab=(?:.*)(?:%3A|:)([^&]*)/, tabToTarget = url.match(tabRegExp), tab;
jQuery(tabs).each(function() {
var tabToCompare = jQuery(this).find("a").attr("href").match(tabRegExp);
if (tabToTarget && tabToTarget.length > 0 && tabToCompare[1] === tabToTarget[1]) {
tab = this;
}
});
return tab;
};

In other page (like http://localhost:8090/browse/TEST?selectedTab=com.atlassian.jira.plugin.system.project%3Asummary-panel, http://localhost:8090/browse/TEST?selectedTab=com.atlassian.jira.plugin.system.project%3Alabels-heatmap-panel- in all pages, that contains "selectedTab=") - issue created without error.
If i remove my custom
project-tabpanel - issue in page http://localhost:8090/browse/TESTcreate without error too.

How fix this bug?


6 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Kateryna January 30, 2014

I find solutions - my plugin key contain "JIRA" - and this regexp "var tabRegExp = /selectedTab=(?:.*)(?:%3A|:)([^&]*)/" in inner JIRA system script not found my project-tabpanel.

0 votes
Deleted user January 30, 2014

hi all

had king of the same issue (same error basically) and I started disabling addons until I found which one was causing the problem...

my problem was with profields clashing with teamlead calendar

Kateryna January 30, 2014

Hi. I'm from Teamlead and we also had problem with this plugin. Fortunately we've discovered it recently. Stay tuned for plugin updates on the Marketplace - the error is resolved now.

0 votes
Fernando del Río January 28, 2014

Add to gtalk! fer.delrio.g@gmail.compls

0 votes
Kateryna January 28, 2014

This is not my script - this is JIRA script. I only add project-tabpanel in my plugin.

0 votes
Fernando del Río January 28, 2014

And if you try hiding the tab with the id when a regular expression is met

I think that is faster and easier than the function that these occupy.

greeting

0 votes
Fernando del Río January 28, 2014

Just to know if I understood,

you are doing according to a particular URL shown or hidden tabs??

what is wrong, to see if I can help

Kateryna January 28, 2014

All tabs are shown.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events