I am attempting to place a new "Web Section" on my "View Issue Page" in JIRA via an Atlassian Connect Add-On.
I read (https://developer.atlassian.com/display/JIRADEV/View+Issue+Page+Locations) that the way to add a new web section here was via defining the location as "opsbar-operations," but the example given on the "Web Sections" page (https://developer.atlassian.com/static/connect/docs/modules/jira/web-section.html) from the "Atlassian Connect" documentation, shows a "." notation for location such as "com.atlassian.jira.plugin.headernav.left.context". Therefore in my atlassian-connect.json file I specified location as "opsbar.operations" instead of "opsbar-operations" but in the end neither notation seemed to reveal my Web Section.
Compiled onto this issue, once I have my new Web Section, I would of course want to populate it with new Web Items, but can't find any information on how address custom locations from the atlassian-connect.json file.
My atlassian-connect.json file is as follows:
{ "name": "Web Section Test", "description": "Testing Web Section Placement", "key": "com.example.myaddon", "baseUrl": "http://localhost:8000", "vendor": { "name": "Example, Inc.", "url": "http://example.com" }, "authentication": { "type": "none" }, "apiVersion":1, "modules": { "webSections": [ { "location": "opsbar.operations", "weight": 1, "key": "my-web-section", "name": { "value": "My Web Section" } } ] } }
Community moderators have prevented the ability to post new answers.
It does not seem to be possible to add ones own drop down menu in the View Issue Page of JIRA, however, to add your own section to the "more" drop-down menu and have it be the top section of said menu, the following code modified to your needs should suffice:
{ "name": "Web Section Test", "description": "Testing Web Section Placement", "key": "com-example-myaddon", "baseUrl": "http://localhost:8000", "vendor": { "name": "Example, Inc.", "url": "http://example.com" }, "authentication": { "type": "none" }, "apiVersion":1, "modules": { "webSections": [ { "location": "opsbar-operations", "weight": 11, "key": "section-key", "name": { "value": "Section Name" } } ], "webItems":[ { "location": "section-key", "name": { "value": "Menu Item Name" }, "key": "menu-item-key", "url":"http://www.google.com" } ] } }
The code belongs inside of the "atlassian-connect.json" file
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Two comments here:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the clarification.
I made the changes and was able to get it to appear in the "more" menu, as its own "section" (merely defined by the gray lines in the drop down menu).
I figured out that the web section wasn't displaying without having any web-items (I suppose that should have been obvious).
Getting it to display in the "more" drop down though was not my original intent. My hope is to create a new button similar to the "more" drop down button that says something like "Processing", and then have web items within that new drop down that say things like "Analyze","Parse", etc.
By setting the weight of my web-section to 1 I was able to displace the "assign" button into the "more" drop down but this is not ideal considering the centrality of the "assign" functionality.
TL;DR - Is there not a way to define an entirely new drop-down button in that location of the view issue page?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Without having tried, you might need to:
I think the tricky bit is finding the web-section's location. It might be "foo" or it might be "operations-foo". Not sure sorry.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well thanks for at least answering and telling me that you aren't sure.
I did attempt your suggestion and it just placed it into the existing "more" drop down. I'm thinking that the functionality to add ones own drop down menu on the view issue page is not an option excluding possibilities of a deep-dive into the source markup.
Kind of weak on the part of Atlassian, but perhaps it will become available in future releases. For now I will settle for a seperate section in the "more" dropdown.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.