It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

custom validator for report/plugin properties? Edited

ryan McCullough May 16, 2012

I am writing a plugin that has an unusual requiremtent for user input (inputs for year and week of year)
is there a way to write a custom validator for these report inputs/properties?

<report key="unusual-report" name="Unusual Report" class="com.foo.UnusualReport">
	<description>Creates an Unusual Report</description>
	<resource type="velocity" name="htmlView" location="templates/report.vm" />
	<resource type="velocity" name="excelView" location="templates/excel.vm" />
	<resource type="i18n" name="i18n" location="com.atlassian.plugins.tutorial.jira.report.singlelevelgroup_report" />
	<label>Unusual Report</label>
	<properties>
		<property>
			<key>year</key>
			<name>Year</name>
			<description>Approxmately 365 days</description>
			<type>text</type>
		</property>
		<property>
			<key>week</key>
			<name>Week</name>
			<description>Week of the Year</description>
			<type>text</type>
		</property>
	</properties>
</report>

Thanks Everyone :)



1 answer

1 accepted

0 votes
Answer accepted
ryan McCullough May 16, 2012 • edited Jan 17, 2019

You silly Noob!;) just use a ValuesGenerator!

<report key="unusual-report" name="Unusual Report" class="com.foo.UnusualReport">
	<description>Creates an Unusual Report</description>
	<resource type="velocity" name="htmlView" location="templates/report.vm" />
	<resource type="velocity" name="excelView" location="templates/excel.vm" />
	<resource type="i18n" name="i18n" location="com.atlassian.plugins.tutorial.jira.report.singlelevelgroup_report" />
	<label>Unusual Report</label>
	<properties>
		<property>
			<key>year</key>
			<name>Year</name>
			<description>Approxmately 365 days</description>
			<type>text</type>
                	<values class="com.foo.YearValueGenerator" />
		</property>
		<property>
			<key>week</key>
			<name>Week</name>
			<description>Week of the Year</description>
			<type>text</type>
                	<values class="com.foo.WeekValueGenerator" />
		</property>
	</properties>
</report>

 

 

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Statuspage

⭐️Would you recommend Statuspage? Leave a (honest!) review. ⭐️

Hi Community friends, We're working on sourcing more reviews on Capterra – a popular software review site –  to help teams like yours make more informed decisions when choosing an inc...

87 views 3 5
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you