Web Item Conditions

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.

com.atlassian.fisheye.plugin.web.conditions.HasFishEye
This condition measures whether the product runs with a FishEye 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.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>/plugins/servlet/my-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>


Was this page helpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport