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

Description

action:abandonReview

Parameter Name: actionName

Causes the current review to be abandoned.

Applies to: HasProjectPermission, HasReviewPermission

action:approveReview

Parameter Name: actionName

Causes the current review to be approved.

Applies to: HasProjectPermission, HasReviewPermission

action:closeReview

Parameter Name: actionName

Causes the current review to be closed.

Applies to: HasProjectPermission, HasReviewPermission

action:recoverReview

Parameter Name: actionName

Causes the current review to be recovered.

Applies to: HasProjectPermission, HasReviewPermission

action:reopenReview

Parameter Name: actionName

Causes the current review to be re-opened.

Applies to: HasProjectPermission, HasReviewPermission

action:rejectReview

Parameter Name: actionName

Causes the current review to be rejected.

Applies to: HasProjectPermission, HasReviewPermission

action:submitReview

Parameter Name: actionName

Causes the current review to be submitted.

Applies to: HasProjectPermission, HasReviewPermission

action:summarizeReview

Parameter Name: actionName

Causes the current review to be summarised.

Applies to: HasProjectPermission, HasReviewPermission

Approval

Parameter Name: stateName

Measures whether the current review is in the approval state.

Applies to: IsReviewInState

Closed

Parameter Name: stateName

Measures whether the current review is in the closed state.

Applies to: IsReviewInState

Dead

Parameter Name: stateName

Measures whether the current review is in the dead state.
Applies to: IsReviewInState

Draft

Parameter Name: stateName

Measures whether the current review is in the draft state.
Applies to: IsReviewInState

Review

Parameter Name: stateName

Measures whether the current review is in the review state.
Applies to: IsReviewInState

Rejected

Parameter Name: stateName

Measures whether the current review is in the rejected state.
Applies to: IsReviewInState

Summarize

Parameter Name: stateName

Measures whether the current review is in the summarize state.
Applies to: IsReviewInState

Unknown

Parameter Name: stateName

Measures whether the current review is in the unknown state.
Applies to: IsReviewInState

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

Example of Condition Parameters in Use

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

Example of a Web Item Condition in Use

1
2
<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>

Rate this page: