Report plugin :All Fields are not getting rendered ..

Sridhar Nimmagadda May 9, 2013

I am usinng the below atlassian-plugin.XML but the fields, only one of the fields is getting rendered.

<atlassian-plugin key="com.misys.alm.jira.plugins.report.misys-custom-reports" name="misys-custom-reports" plugins-version="2">

<plugin-info>

<description>This is the com.misys.alm.jira.plugins.report:misys-custom-reports plugin for Atlassian JIRA.</description>

<version>1.0-SNAPSHOT</version>

<vendor name="Example Company" url="http://www.example.com/" />

</plugin-info>

<report key="historyChangeReport" name="History Change Report"

class="com.misys.alm.jira.plugins.report.reportimpl.HistoryChangeReport">

<description key="history_change.configure.report.description">History of all changes occured for issues based on a criteria</description>

<resource type="velocity" name="view"

location="com/misys/alm/jira/plugins/templates/history_change_report.vm" />

<resource type="i18n" name="i18n"

location="com.misys.alm.jira.plugins.report.properties.history_change_report" />

<label key="history_change.configure.report.name" />

<properties>

<property>

<key>start_date</key>

<name>history_change.configure.report.fields.start_date_name</name>

<description>history_change.configure.report.fields.start_date_description</description>

<type>date</type>

</property>

<property>

<key>end_date</key>

<name>history_change.configure.report.fields.end_date_name</name>

<description>history_change.configure.report.fields.end_date_description</description>

<type>date</type>

</property>

</properties>

</report>

</atlassian-plugin>

2 answers

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 9, 2013

Ok, checking the xml in the plugin is a good debug step, but I don't understand the "either" bit. Could you explain exactly what changes in the xml provoke what behaviours? For example, if you put both in as above, you only see the end_date. But what if you reverse the order of the two fields? If you remove end_date completely, does start date appear?

And...

What is in the source of the page?

What does your log file say?

Sridhar Nimmagadda May 9, 2013

I am getting the properties after a JIRA restart..even unistall and reinstall of the plugin is not helping.

Sridhar Nimmagadda May 9, 2013

The Source if the page contains only start_date and hidden fields (selectedProjectId and reportType).

Now if I Remove the start_date property and retain only the end_date.

I would still see the start_date and no end_date, logs wouldn't say anything (this despite unistalling and reinstalling the plugin)

everything thing seems to fall in place once I restart

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 9, 2013

Restarting is not really relevant. Could you answer the questions I asked before?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 9, 2013

I'm really struggling to understand what you are doing here. You aren't telling us when you're restarting, or what changes you make between restarts. You still haven't explained the symptoms you are getting as you go through each cycle of change and deploy.

Could you tell us exactly what you are seeing for each test *separately*? Ensure that you stop Jira completely in between deployments (For a completely clean environment). Four tests:

1. Both start and end date in the file

2. Both end and start date in the file (reversed)

3. Only start date

4. Only end date

Sridhar Nimmagadda May 15, 2013

To start with the report definition has property Start Date and I deploy it.

I see the Start Date

later I modify to add property End Date and when I deploy it i would not see End Date

I restart the server I can see both the Start Date and End Date

Hope this explanation helps.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 15, 2013

Um, then I do not understand why you are even asking this question? If you restart the server and both fields appear, then there is no problem - it's all working!

Sridhar Nimmagadda May 15, 2013

Ok let me change my question..why do I need to restart the server if I need to add an additional property to the Report ?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 15, 2013

Now that's a totally different question. You were asking what was wrong with your code (nothing, as it turns out). This is about rapid development.

The short answer is that Jira loads a lot of stuff at startup, including bits of plugins. When you change your code, you need to get Jira to unload and reload the plugin. From scratch. Completely. Because you've changed code.

You need an explicit "drop this old plugin completely and reload it". A restart is one way of doing it and the UPM can do it for most plugins as well.

My next question is how you are triggering the reload? If at all?

Sridhar Nimmagadda May 15, 2013

Well whenever I change the plugin descriptor I am unloading and reloading the plugin using UPM , despite this the property doesn't get rendered.

Only when I restart the server I seem to get to see all the changes.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 9, 2013

I can't see anything immediately wrong with the xml. When you say "does not render", do you mean that one field appears on the "report configuration" screen and there is absolutely no sign of the other? Can you tell us which one of the two fields appears and which does not?

Two things to try as well

1. Go to the screen and press ctrl-u (for "view source" - may not be that particular key in some browsers). Have a read of the html to see if any hint of the missing field is there

2. Read the log file - when I've messed up my atlassian-plugin.xml files, I've usually got some error in the log when I hit the report config screen.

Sridhar Nimmagadda May 9, 2013

It seems to render only one field.

Either Start date or End Data, one more issue is that even if remove the fields(property) in Atlassian-plugin.xml and add new one they would not end in the configure screen.

I have checked the Atlassian-plugin.xml by unpacking the plugin jar it looks changed but the configure screen remains the same old screen.

For the Atlassian-plugin attached I see only the End Date field


Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events