-
-
Notifications
You must be signed in to change notification settings - Fork 74
Button not displaying on PRs which are merged #197
Comments
Which version of Bitbucket Server is that? |
4.11.1 |
No errors in the console tab of developer tools? |
Now I see it! I just released 2.54 that changes the "state" label to "Ignore if". Which is what those 2 checkboxes does. They ignore the notification if the PR is merged/declined. |
@tomasbjerre Was the fix just the label? I tried changing the configuration by unchecking the "State" (="Ignore if") conditions, and the issue still persists - the button is not appearing for merged PRs. The button is not appearing for PRs that have been merged: |
Yes that was the only change. Perhaps the problem is a conflict with the Webhook to Jenkins plugin. If you disable that plugin, does the button from this plugin show up correctly also for unmerged PR:s? |
@tomasbjerre I believe the Webhook to Jenkins plugin has always been disabled for the repository - do you know what else could affect this? |
The "Trigger Notification" -button in your first screenshot, is that not from the Webhook to Jenkins plugin? |
I think it's from PR notifier (?) Please correct me if I'm wrong.
This fragment appears both on the merged and non-merged PRs, but I only see it as a button on merged PRs. |
Ok I will probably have some time to look at this tomorrow. Thanks for the info! |
Thanks @tomasbjerre ! |
I just tried it with Webhook plugin and there is no conflict. It works for me. And you have no errors in the console log? |
I have configuration like this:
Gives:
Gives:
And that button is also shown in GUI. What do you get with these curl commands? |
I read this issue a bit to quick. It must be a frontend issue. Very hard to investigate unless there is an error in the console view of Developer Tools. Any other plugins you have installed that might cause it? |
The "Trigger Notification" is added here: It is just a placeholder that should be removed immediately when the page loads: If is not removed, I would suspect that:
|
Strange... Do you have anyone there who knows some Javascript and can debug it? the pr-triggerbutton.js is not minified and can be debugged. It should find a button, the one called "Trigger Button", remove it and add new buttons in its place. |
:'( Sure, I'll keep you updated once I find someone and find out what happened. Thanks! |
@tomasbjerre I was trying to debug it, but Bitbucket minifies it automatically so it's basically impossible to debug on our production instance. |
Thanks for trying @itay =) Maby try |
Also, perhaps you can add the un-minified version from your local filesystem: https://developers.google.com/web/tools/setup/setup-workflow |
Unfortunately this is production system with over 1000 users - we can't mess with it :) |
But if you add local pr-buttontrigger.js it will only affect you. |
Ah, I misread it. We can give it a shot. |
@aepfli Are your buttons returned from the rest-service? |
@tomasbjerre besides the workzone plugin - this was the only plugin we updated! buttons REST CALL |
imho: is this "version" related... if so, maybe deactivate the version for others... so they wont get that problem! |
i am right now getting a frontend dev.. to take a look with me... but, we also just use the minified version, as we cant switch for 500 users atm... also i will issue a restart of stash at night... maybe the old "quick fix" will help :D but i will come back to this topic! |
Great! Thanks :) |
okay so right now i am debugging this with the minified version, and chrome is helping a lot by pretty print... strangely on page load there is no object ".triggerManualNotification" the array length is null... this is happening on the first time it steps into your js part...! |
as i am not really familiar with plugin development, i found something which can be related! i saw you changed the "definition" of the item, from web-item to client-web-item in d1ca3cd maybe those are still two different issues, and mine is related to my version 4.6.1 and the bug, which is explained in https://jira.atlassian.com/browse/BSERV-8896! just some ideas! if i am on the wrong path, let me know! |
A $buttonArea is saved here: And here the triggerManualNotification is removed: So do you have a $buttonArea? Perhaps p.append(u) is: https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket/blob/master/src/main/resources/pr-triggerbutton.js#L286 |
i read your code, and i am pretty aware of when and where stuff gets loaded. but when i use jquery to get an object with class "triggerManualNotification" during debugging, on line 12, i get an empty array! So this object is not there, at that moment!, and isnt for the whole time, on every breakpoint, i cant find this element! So there is at least the bug for my problem! that this i not in the html! And as i am using an "older" version -> this may relates to my comment 5 minutes ago! and my findings |
OK! Sounds very interesting. Thanks. I will have a closer look at this later today. For the record, that triggerManualNotification class should have been added from this config: |
yeah and in this file you should add: well i checked your project out, and did the change already (not tested) but i cant push to your project... not familiar with github so far. but will dig into it, and try to provide a pull request! |
* Buttons are not showing. Probably because of an Atlassian Bug BSERV-8896.
* Buttons are not showing. Probably because of an Atlassian Bug BSERV-8896.
I released this in 2.58 now. Really hope it works, thanks a lot @aepfli ! Please confirm if it works for you! |
Hi! Sadly 2.58 did not work! But we downgraded to version 2.54 and everything is running smoothly again! I will get a docker with bitbucket running today, and evaluate different versions of bitbucket and 2.58! At least I will try, can't promise anything :) |
* This fix is not relying on the button being added by web-client-item configuration in atlassian-plugin.xml. The JS will now find the button-area without using the triggerManualNotification-class.
You may try 2.59. @aepfli You do get the buttons from the REST resource tight? |
Actually, 2.60! |
@aepfli @ahadiwijaya @itay did any of you try this? Is it solved? |
Tried today just for 5 min, did not work... But so far I had not time to debug... |
Manually pasting this line into the console and see what it evaluates to, would be interesting. |
Well right now I am 10 days out of office helping a junior team somewhere... So I will check after that! |
I also happen to be on holiday this week and next :) |
We have a trigger that is configured like this:
I can see the API returning it:
However, it's not being rendered:
Any idea what might be happening?
The text was updated successfully, but these errors were encountered: