<sect1 id="dev.eventref.bug">
	<title>Bug and Bugnote Events</title>

	<sect2 id="dev.eventref.bug.view">
		<title>Bug View</title>

		<blockquote id="dev.eventref.bug.view.details">
			<title>EVENT_VIEW_BUG_DETAILS (Execute)</title>

			<blockquote>
				<para>
					This event allows a plugin to either process information or display some
					data in the bug view page.  It is triggered after the row containing the
					target version and product build fields, and before the bug summary is
					displayed.
				</para>

				<para>
					Any output here should be defining appropriate rows and columns for the
					surrounding <programlisting>&lt;table&gt;</programlisting> elements.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;Integer&gt;: Bug ID</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.bug.view.extra">
			<title>EVENT_VIEW_BUG_EXTRA (Execute)</title>

			<blockquote>
				<para>
					This event allows a plugin to either process information or display some
					data in the bug view page.  It is triggered after the bug notes have been
					displayed, but before the history log is shown.
				</para>

				<para>
					Any output here should be contained within its own
					<programlisting>&lt;table&gt;</programlisting> element.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;Integer&gt;: Bug ID</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

	</sect2>

	<sect2 id="dev.eventref.bug.action">
		<title>Bug Actions</title>

		<blockquote id="dev.eventref.bug.action.reportbugform">
			<title>EVENT_REPORT_BUG_FORM (Execute)</title>

			<blockquote>
				<para>
					This event allows plugins to do processing or display form elements on
					the Report Issue page.  It is triggered immediately before the summary
					text field.
				</para>

				<para>
					Any output here should be defining appropriate rows and columns for the
					surrounding &lt;table&gt; elements.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;Integer&gt;: Project ID</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.bug.action.reportbugformtop">
			<title>EVENT_REPORT_BUG_FORM_TOP (Execute)</title>

			<blockquote>
				<para>
					This event allows plugins to do processing or display form elements at
					the top of the Report Issue page.  It is triggered before any of the
					visible form elements have been created.
				</para>

				<para>
					Any output here should be defining appropriate rows and columns for the
					surrounding &lt;table&gt; elements.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;Integer&gt;: Project ID</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.bug.action.reportbugdata">
			<title>EVENT_REPORT_BUG_DATA (Chain)</title>

			<blockquote>
				<para>
					This event allows plugins to perform pre-processing of the new bug data
					structure after being reported from the user, but before the data is
					saved to the database.  At this point, the issue ID is not yet known, as
					the data has not yet been persisted.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;Complex&gt;: Bug data structure (see <filename>core/bug_api.php</filename>)</para></listitem>
				</itemizedlist>

				<itemizedlist>
					<title>Return Value</title>
					<listitem><para>&lt;Complex&gt;: Bug data structure</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.bug.action.reportbug">
			<title>EVENT_REPORT_BUG (Execute)</title>

			<blockquote>
				<para>
					This event allows plugins to perform post-processing of the bug data
					structure after being reported from the user and being saved to the
					database.  At this point, the issue ID is actually known, and is passed
					as a second parameter.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;Complex&gt;: Bug data structure (see <filename>core/bug_api.php</filename>)</para></listitem>
					<listitem><para>&lt;Integer&gt;: Bug ID</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.bug.action.updatebugform">
			<title>EVENT_UPDATE_BUG_FORM (Execute)</title>

			<blockquote>
				<para>
					This event allows plugins to do processing or display form elements on
					the Update Issue page.  It is triggered immediately before the summary
					text field.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;Integer&gt;: Bug ID</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.bug.action.updatebugformtop">
			<title>EVENT_UPDATE_BUG_FORM_TOP (Execute)</title>

			<blockquote>
				<para>
					This event allows plugins to do processing or display form elements on
					the Update Issue page.  It is triggered immediately before before any
					of the visible form elements have been created.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;Integer&gt;: Bug ID</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.bug.action.updatebug">
			<title>EVENT_UPDATE_BUG (Chain)</title>

			<blockquote>
				<para>
					This event allows plugins to perform both pre- and post-processing of
					the updated bug data structure after being modified by the user, but
					before being saved to the database.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;Complex&gt;: Bug data structure (see <filename>core/bug_api.php</filename>)</para></listitem>
					<listitem><para>&lt;Integer&gt;: Bug ID</para></listitem>
				</itemizedlist>

				<itemizedlist>
					<title>Return Value</title>
					<listitem><para>&lt;Complex&gt;: Bug data structure</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.bug.action.bugaction">
			<title>EVENT_BUG_ACTION (Execute)</title>

			<blockquote>
				<para>
					This event allows plugins to perform post-processing of group actions
					performed from the View Issues page.  The event will get called for
					each bug ID that was part of the group action event.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;String&gt;: Action title (see <filename>bug_actiongroup.php</filename>)</para></listitem>
					<listitem><para>&lt;Integer&gt;: Bug ID</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.bug.action.bugdelete">
			<title>EVENT_BUG_DELETED (Execute)</title>

			<blockquote>
				<para>
					This event allows plugins to perform pre-processing of bug deletion
					actions.  The actual deletion will occur after execution of the event,
					for compatibility reasons.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;Integer&gt;: Bug ID</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

	</sect2>

	<sect2 id="dev.eventref.bug.noteview">
		<title>Bugnote View</title>

		<blockquote id="dev.eventref.bug.noteview.start">
			<title>EVENT_VIEW_BUGNOTES_START (Execute)</title>

			<blockquote>
				<para>
					This event allows a plugin to either process information or display some
					data in the bug notes section, before any bug notes are displayed.  It is
					triggered after the bug notes section title.
				</para>

				<para>
					Any output here should be defining appropriate rows and columns for the
					surrounding &lt;table&gt; elements.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;Integer&gt;: Bug ID</para></listitem>
					<listitem><para>&lt;Complex&gt;: A list of all bugnotes to be displayed to the user</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.bug.noteview.note">
			<title>EVENT_VIEW_BUGNOTE (Execute)</title>

			<blockquote>
				<para>
					This event allows a plugin to either process information or display some
					data in the bug notes section, interleaved with the individual bug notes.
					It gets triggered after every bug note is displayed.
				</para>

				<para>
					Any output here should be defining appropriate rows and columns for the
					surrounding &lt;table&gt; elements.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;Integer&gt;: Bug ID</para></listitem>
					<listitem><para>&lt;Integer&gt;: Bugnote ID</para></listitem>
					<listitem><para>&lt;Boolean&gt;: Private bugnote (false if public)</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.bug.noteview.end">
			<title>EVENT_VIEW_BUGNOTES_END (Execute)</title>

			<blockquote>
				<para>
					This event allows a plugin to either process information or display some
					data in the bug notes section, after all bugnotes have been displayed.
				</para>

				<para>
					Any output here should be defining appropriate rows and columns for the
					surrounding &lt;table&gt; elements.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;Integer&gt;: Bug ID</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

	</sect2>

	<sect2 id="dev.eventref.bug.noteaction">
		<title>Bugnote Actions</title>

		<blockquote id="dev.eventref.bug.noteaction.addform">
			<title>EVENT_BUGNOTE_ADD_FORM (Execute)</title>

			<blockquote>
				<para>
					This event allows plugins to do processing or display form elements in
					the bugnote adding form.  It is triggered immediately after the bugnote
					text field.
				</para>

				<para>
					Any output here should be defining appropriate rows and columns for the
					surrounding &lt;table&gt; elements.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;Integer&gt;: Bug ID</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.bug.noteaction.add">
			<title>EVENT_BUGNOTE_ADD (Execute)</title>

			<blockquote>
				<para>
					This event allows plugins to do post-processing of bugnotes added to an
					issue.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;Integer&gt;: Bug ID</para></listitem>
					<listitem><para>&lt;Integer&gt;: Bugnote ID</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.bug.noteaction.editform">
			<title>EVENT_BUGNOTE_EDIT_FORM (Execute)</title>

			<blockquote>
				<para>
					This event allows plugins to do processing or display form elements in
					the bugnote editing form.  It is triggered immediately after the bugnote
					text field.
				</para>

				<para>
					Any output here should be defining appropriate rows and columns for the
					surrounding &lt;table&gt; elements.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;Integer&gt;: Bug ID</para></listitem>
					<listitem><para>&lt;Integer&gt;: Bugnote ID</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.bug.noteaction.edit">
			<title>EVENT_BUGNOTE_EDIT (Execute)</title>

			<blockquote>
				<para>
					This event allows plugins to do post-processing of bugnote edits.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;Integer&gt;: Bug ID</para></listitem>
					<listitem><para>&lt;Integer&gt;: Bugnote ID</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.bug.noteaction.deleted">
			<title>EVENT_BUGNOTE_DELETED (Execute)</title>

			<blockquote>
				<para>
					This event allows plugins to do post-processing of bugnote deletions.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;Integer&gt;: Bug ID</para></listitem>
					<listitem><para>&lt;Integer&gt;: Bugnote ID</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.bug.action.tagattached">
			<title>EVENT_TAG_ATTACHED (Execute)</title>

			<blockquote>
				<para>
					This event allows plugins to do post-processing of attached tags.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;Integer&gt;: Bug ID</para></listitem>
					<listitem><para>&lt;Array of Integers&gt;: Tag IDs</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

				<blockquote id="dev.eventref.bug.action.tagdetached">
			<title>EVENT_TAG_DETACHED (Execute)</title>

			<blockquote>
				<para>
					This event allows plugins to do post-processing of detached tags.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>&lt;Integer&gt;: Bug ID</para></listitem>
					<listitem><para>&lt;Array of Integers&gt;: Tag IDs</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

	</sect2>

</sect1>
