Crucible 2.7 : Crucible Web Items

The content on this page is deprecated. Please see the separate documentation space for developer reference material about FishEye and Crucible.

Web UI plugin modules allow you to add links, interactive elements and page segments to the Crucible user interface. By adding a link to a servlet plugin you can add your own pages to the UI. Your pages will need to ask Crucible to provide standard headers and footers by specifying a Decorator. There are also FishEye Web Items.

On this page:

For an example of the code syntax, see FishEye Web Items.

Web Items Listing and Reference

Key

Description

Helpers available

Crucible Web Items

Links on the admin menu. Sections: repositories, global, system.

application, user

Crucible Web Items

After 'My Dashboard' in the dropdown project/dashboard selector menu

application, user

Crucible Web Items

Actions which can be performed on a review. These appear both as buttons on the review page and as links on an expanded review in a review list.

application, user, project, review

Crucible Web Items

Actions which can be performed on a review comment. These appear as buttons in the comment header bar, left of the reply, edit and delete buttons.

application, user, project, review, reviewItem, repository, comment

Crucible Web Items

Actions which can be performed on a revision in a review. Displayed next to the 'Remove', 'Change Diff' buttons.

application, user, project, review, reviewItem, repository

Crucible Web Items

Links like 'Crucible' and 'Fisheye' in the header. Sections: fisheye, crucible (sections are shown when a particular application is selected)

application, user

Crucible Web Items

Links in the header, separated by a pipe.

application, user

Crucible Web Items

Links on the Crucible or Fisheye main page. These appear at the bottom of the Crucible or FishEye boxes on the main page. Sections: fisheye, crucible

application, user

Crucible Web Items

The user profile tabs.

application, user

Web Item Conditions

Conditions control whether a given web item will be displayed.

com.atlassian.fisheye.plugin.web.conditions.HasCrucible
This condition measures whether the product runs with a Crucible license. This is useful to prevent a Crucible plugin from rendering in an instance that only has a FishEye license.

com.atlassian.fisheye.plugin.web.conditions.HasFishEye
This condition measures whether the product runs with a FishEye license.

com.atlassian.fisheye.plugin.web.conditions.HasProjectPermission
This condition measures whether the user has project permission. Takes parameters.

com.atlassian.fisheye.plugin.web.conditions.HasReviewPermission
This condition measures whether the user has review permission (i.e. is able to take part in the review). Takes parameters.

com.atlassian.fisheye.plugin.web.conditions.IsFile
This condition passes if there is a context repository and path, and that path references a repository file.

com.atlassian.fisheye.plugin.web.conditions.IsReviewInState
This condition measures whether the review is in a given state. Takes parameters.

com.atlassian.fisheye.plugin.web.conditions.IsRootOrDirectory
This condition passes if there is either: a context repository and no repository context path; or a repository path is present, and that path references a directory.

com.atlassian.fisheye.plugin.web.conditions.IsSystemAdministrator
This condition measures whether the user has system administrator permissions.

com.atlassian.fisheye.plugin.web.conditions.UserCanAccessCrucible
This condition measures whether the user can access Crucible.

com.atlassian.fisheye.plugin.web.conditions.UserLoggedInCondition
This condition measures whether the user is logged in.

Condition Parameters

The following conditions take parameters:

  • HasProjectPermission
  • HasReviewPermission
  • IsReviewInState

The usage and conditions that these parameters apply to are tabled below.

Parameter Value

Parameter Name

Description

Applies to

action:abandonReview

actionName

Causes the current review to be abandoned.

HasProjectPermission, HasReviewPermission

action:approveReview

actionName

Causes the current review to be approved.

HasProjectPermission, HasReviewPermission

action:closeReview

actionName

Causes the current review to be closed.

HasProjectPermission, HasReviewPermission

action:recoverReview

actionName

Causes the current review to be recovered.

HasProjectPermission, HasReviewPermission

action:reopenReview

actionName

Causes the current review to be re-opened.

HasProjectPermission, HasReviewPermission

action:rejectReview

actionName

Causes the current review to be rejected.

HasProjectPermission, HasReviewPermission

action:submitReview

actionName

Causes the current review to be submitted.

HasProjectPermission, HasReviewPermission

action:summarizeReview

actionName

Causes the current review to be summarised.

HasProjectPermission, HasReviewPermission

Approval

stateName

Measures whether the current review is in the approval state.

IsReviewInState

Closed

stateName

Measures whether the current review is in the closed state.

IsReviewInState

Dead

stateName

Measures whether the current review is in the dead state.

IsReviewInState

Draft

stateName

Measures whether the current review is in the draft state.

IsReviewInState

Review

stateName

Measures whether the current review is in the review state.

IsReviewInState

Rejected

stateName

Measures whether the current review is in the rejected state.

IsReviewInState

Summarize

stateName

Measures whether the current review is in the summarize state.

IsReviewInState

Unknown

stateName

Measures whether the current review is in the unknown state.

IsReviewInState

Applying these values will cause the action to be enacted on the currently logged-in user.

Example of Condition Parameters in Use

<condition class="com.atlassian.fisheye.plugin.web.conditions.HasReviewPermission">
           <param name="actionName" value="action:approveReview"/>
       </condition>

Example of a Web Item Condition in Use

<web-item key="hello-file2" section="system.crucible.review.fileitem">
       <link>#set($x = 'test')/plugins/servlet/${x}-servlet?name=${helper.global.user.displayName}</link>
       <label key="Id: {0}">
           <param name="param0">${helper.review.permaId.id}</param>
       </label>
       <condition class="com.atlassian.fisheye.plugin.web.conditions.IsReviewInState">
           <param name="stateName" value="Draft"/>
       </condition>
</web-item>


Visual Locations of Crucible Web Items

system.admin

This item relates to links in the left navigation bar, in the Crucible admin menu.

Screenshot: Crucible's system.admin/repositories Web Item

Screenshot: Crucible's system.admin/global Web Item

Screenshot: Crucible's system.admin/system Web Item




system.crucible.dashboard

This item relates to dashboard links in the Crucible dashboard/project drop-down menu.

Screenshot: Crucible's system.crucible.dashboard Web Item




system.crucible.review

This item relates to actions that can be performed on a review, appearing in various places inside the Crucible UI.

Screenshot: Crucible's system.crucible.review Web Item




system.crucible.review.comment

This item relates to actions that can be performed on a review, appearing in various places inside the Crucible UI.

Screenshot: Crucible's system.crucible.review.comment Web Item




system.crucible.review.fileitem

This item relates to actions which can be performed on a revision in a review, in the Crucible UI.

Screenshot: Crucible's system.crucible.review.fileitem Web Item




system.header.application

This item relates to product name links in the Crucible header.

(info) Note that a system.header.application item must go into a section of either Crucible or FishEye. In this case, we have put it into the Crucible section.

Screenshot: Crucible's system.header.application Web Item




system.header.item

This item relates to links in the Crucible header, at the top right of the Crucible screen.

Screenshot: Crucible's system.header.item Web Item




system.main/crucible

This item relates to links at the bottom of the Crucible main page.

Screenshot: Crucible's system.main/crucible Web Item




system.userprofile.tab

This item relates to user profile tabs in the Crucible UI.

Screenshot: Crucible's system.userprofile.tab Web Item




(info) Looking for the FishEye web items? Click here.