[Jira SDK] Issue with CSS Styles in web-item component (atlassian-plugin.xml)

Gabriel Sánchez
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 12, 2018

Hi everyone.

Am implementing a JIRA plugin for my company, working with JIRA sdk.

I am working on the 'atlassian-plugin.xml' file. I have included a '<web-item>' element and, as an element of it, i have included the <styleClass> element. Here I make reference to a CSS style included in src/main/resources/css/mystyle.css.

 

So my code in 'atlassian-plugin.xml' is like next:

 

<web-resource key="key-resources" name="Some Name Web Resources">

 

<resource type="download" name="mystyle.css" location="/css/mystyle.css"/>

 

</web-resource>

 

<web-item name="itemName" key="itemKey" section="system.top.navigation.bar" weight="1000">

<description key="description">This is a description</description>

<label key="labelKey"/>

<link linkId="linkid" ></link>

<styleClass>my-class</styleClass>

</web-item>

my-class is defined in 'mystyle.css'. The style is very simple (just background-color: yellow;)

But the style, when deployed, the web-item component is shown fine in the top navigation, but it´s not applied the Css style I have included. Somehow, the location of css is not found, and i don´t understand why.

When i check with google crome developper tool, i don´t even see my custom style - That´s why my guess is that the style is not "found".

 

Any help on this?, Anyone knows if is missing some other reference to the css file, somewhere? - Also i have tested including the '<resource type="download"....'name="mystyle.css"..... /> as an element inside '<web-item', but with not success.


Best regards,

Gabriel.

1 answer

0 votes
Ege KOCABAS
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 7, 2020

Have you found any solution?

Suggest an answer

Log in or Sign up to answer