Web-section on admin plugin menu

Rafał Janiczak June 24, 2015

Hello

I create add-on on Jira Cloud and I have a question.

Is it possible to put my own section on 'admin plugin menu' with title?
I would like to get such effect as, for example APPLICATION LINKS

 

screen.png


Thank you in advance for all your answers
Best Regards

3 answers

1 accepted

1 vote
Answer accepted
Rafał Janiczak June 25, 2015

Ok. I found a cure for this issue :-)

I used adminPages module in my descriptor file. It should look like this:

"webSections": 
        [
            {
                "location": "admin_plugins_menu",
                "weight": 50,
                "key": "my-section",
                "name": 
                {
                    "value": "Section name"
                }
            }
        ],

        "adminPages": 
        [
            {
                "url": "/page",
                "location": "admin_plugins_menu/my-section",
                "key": "my-page",
                "name": 
                {
                    "value": "My Page"
                }
            } 
        ]
1 vote
TtheB
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 24, 2015
<web-section key="com.example.section" name="Section Title" location="system.admin" weight="150">
    <label key="com.example.section.label"/>
</web-section>

<web-item key="com.example.item" name="Plugin Name" section="system.admin/com.example.section"
          weight="100">
    <label key="com.example.item.label"/>
    <link>/admin/plugins/example/example.action</link>
</web-item>

You can use different weight-values to define the order of your section in relation to the other sections.

I just noticed, that you asked for Jira, my answer is for Confluence, but the concept is the same. You may have to fiddle with the right location names: https://developer.atlassian.com/jiradev/jira-architecture/web-fragments/administration-area-locations

For Connect-Addons it is:

https://developer.atlassian.com/static/connect/docs/latest/modules/common/web-section.html

https://developer.atlassian.com/static/connect/docs/latest/modules/common/web-item.html

 

 

Rafał Janiczak June 24, 2015

This is OnDemand plugin. I build plugin based on atlassian-connect.json descriptor file.

0 votes
Rafał Janiczak June 24, 2015

I read this documentation all the time, but I didn't know that in webItem I have to put full path in location attribute with my new section parent.
Like in your example, should be

section="system.admin/com.example.section"

not only

section="com.example.section"

 

So, ok, I got this. Now I have a problem that my page opens on my add-on's host product, not in on jira product. When I change webItem context from "addon" to "product", I get 404 error.

Problem is similar to http://stackoverflow.com/questions/25131475/atlassian-connect-web-item-url-issue,
unresolved btw.

I would be grateful for a cure for this issue :-)

Suggest an answer

Log in or Sign up to answer