Web-section on admin plugin menu

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

Accepted Answer
1 vote

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"
                }
            } 
        ]
<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

 

 

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

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
Community showcase
Posted Sep 18, 2018 in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

21,196 views 2 7
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you