---
schema: rendered-html/v1
title: "FieldBasedValuesCondition | Developer Portal for YouTrack and Hub Documentation"
source_url: https://www.jetbrains.com/help/youtrack/devportal/v1-FieldBasedValuesCondition.html
generated_at: 2026-06-11T15:16:39.681730+00:00
---






- Developer Portal
- Apps
- MCP Tools
- YouTrack Workflows
- JavaScript Workflow Quick Start Guide
- Create a Workflow
- Edit a Workflow
- Workflow Rule Types
- Transactions
- Use Cases for Workflows
- Web-based Workflow Editor
- Using an External Code Editor
- Default Workflows
- Custom Workflow Repository
- JavaScript Workflow Reference
- Rule-specific Properties
- Context
- Requirements
- Using the Workflow API
- Building Integrations with Slack
- Using REST API Methods in JavaScript Workflows
- Working with Dates and Times
- Working with Periods
- Localized Workflow Messages
- Troubleshooting Workflows
- Remote Debugger
- YouTrack Workflow API
- Change Log
- date-time
- entities
- AbstractVcsItem
- Agile
- AppGlobalStorage
- Article
- ArticleAttachment
- ArticleComment
- BaseArticle
- BaseArticleAttachment
- BaseArticleComment
- BaseComment
- BaseEntity
- BaseWorkItem
- Build
- BundleElementCondition
- BundleProjectCustomField
- Calendar
- Calendar24x7
- ChangesProcessor
- Channel
- EnumField
- FeedbackForm
- Field
- FieldBasedBundleValuesCondition
- [FieldBasedUserValuesCondition](jetbrains__com__help__youtrack__devportal__v1-fieldbaseduservaluescondition.md)
- [FieldBasedValuesCondition](v1-FieldBasedValuesCondition.html)
- [Fields](jetbrains__com__help__youtrack__devportal__v1-fields.md)
- [Gantt](jetbrains__com__help__youtrack__devportal__v1-gantt.md)
- [GroupProjectCustomField](jetbrains__com__help__youtrack__devportal__v1-groupprojectcustomfield.md)
- [Issue](jetbrains__com__help__youtrack__devportal__v1-issue.md)
- [IssueAttachment](jetbrains__com__help__youtrack__devportal__v1-issueattachment.md)
- [IssueComment](jetbrains__com__help__youtrack__devportal__v1-issuecomment.md)
- [IssueLinkPrototype](jetbrains__com__help__youtrack__devportal__v1-issuelinkprototype.md)
- [IssueTag](jetbrains__com__help__youtrack__devportal__v1-issuetag.md)
- [IssueWorkItem](jetbrains__com__help__youtrack__devportal__v1-issueworkitem.md)
- [Iterator](jetbrains__com__help__youtrack__devportal__v1-iterator.md)
- JsonForArticleAddAttachment
- JsonForArticleAddComment
- JsonForArticleConstructor
- JsonForIssueAddAttachment
- JsonForIssueAddComment
- JsonForIssueAddWorkItem
- JsonForIssueCommentAddAttachment
- JsonForIssueConstructor
- JsonForUserNotify
- MailboxChannel
- OwnedField
- PeriodProjectCustomField
- PersistentFile
- Project
- ProjectCustomField
- ProjectTeam
- ProjectType
- ProjectVersion
- PullRequest
- PullRequestState
- Requirement
- Requirements
- SavedQuery
- Set
- SimpleCalendar
- SimpleProjectCustomField
- Sprint
- State
- Tag
- TextProjectCustomField
- User
- UserAttributes
- UserCondition
- UserGroup
- UserProjectCustomField
- UserType
- VcsChange
- VcsServer
- WatchFolder
- WorkItemAttributeValue
- WorkItemAttributes
- WorkItemProjectAttribute
- WorkItemType
- http
- license
- notifications
- search
- strings
- workflow
- YouTrack Import Scripts
- YouTrack Form API
- YouTrack REST API
- Hub REST API

1. YouTrack Workflows
2. JavaScript Workflow Reference
3. YouTrack Workflow API
4. entities
5. [FieldBasedValuesCondition](#0)

# FieldBasedValuesCondition﻿

Last modified: 07 May 2026

Represents the base entity for a value-based condition for a custom field in a project.

Extends BaseEntity.

Available since 2025.3

## Properties﻿

| --- | --- | --- |
| becomesRemoved | Boolean | Read-only.   When `true`, the entity is removed in the current transaction. Otherwise, `false`. This property can become `true` only in on-change rules when the rule is triggered on the removal of an issue or an article. In the rule code, the `runOn` rule property must contain the `removal` parameter set to `true`.    Available since 2017.4.37915  ``` runOn: {removal: true} ``` |
| extensionProperties | Object | The object containing extension properties for this entity and their values. Extension properties are custom properties that might be added to core YouTrack entities by an app. For details about extension properties, see <https://www.jetbrains.com/help/youtrack/devportal/apps-extension-properties.html>.    Available since 2024.3  ``` const entities = require('@jetbrains/youtrack-scripting-api/entities');  exports.rule = entities.Issue.action({     command: 'test',     action: function (ctx) {         const printValues = () => {             return 'stringProp:' + ctx.issue.extensionProperties.stringProp + ';'                 + 'integerProp:' + ctx.issue.extensionProperties.integerProp + ';'                 + 'booleanProp:' + ctx.issue.extensionProperties.booleanProp + ';'                 + 'issueProp:' + ctx.issue.extensionProperties.issueProp?.id + ';'                 + 'issuesProp:' + ctx.issue.extensionProperties.issuesProp?.first()?.id + ';'         }         ctx.issue.addComment(printValues());     } }); ``` |
| field | BundleProjectCustomField | Read-only.   The custom field that this condition is based on.    Available since 2025.3 |
| isNew | Boolean | Read-only.   When `true`, the entity is created in the current transaction. Otherwise, `false`.    Available since 2018.2.42351 |

## Methods﻿

### becomes﻿

becomes(fieldName, expected)

Checks whether a field is set to an expected value in the current transaction.


| --- | --- | --- |
| fieldName | string | The name of the field to check. |
| expected | string | The expected value. |

**Return Value**

| --- | --- |
| boolean | If the field is set to the expected value, returns `true`. |

### canBeReadBy﻿

canBeReadBy(fieldName, user)

Checks whether a user has permission to read the field.


| --- | --- | --- |
| fieldName | string | The name of the field. |
| user | User | The user for whom the permission to read the field is checked. |

**Return Value**

| --- | --- |
| boolean | If the user can read the field, returns `true`. |

### canBeWrittenBy﻿

canBeWrittenBy(fieldName, user)

Checks whether a user has permission to update the field.


| --- | --- | --- |
| fieldName | string | The name of the field. |
| user | User | The user for whom the permission to update the field is checked. |

**Return Value**

| --- | --- |
| boolean | If the user can update the field, returns `true`. |

### is﻿

is(fieldName, expected)

Checks whether a field is equal to an expected value.

Available since 2019.2.55603


| --- | --- | --- |
| fieldName | string | The name of the field to check. |
| expected | string | The expected value. |

**Return Value**

| --- | --- |
| boolean | If the field is equal to the expected value, returns `true`. |

### isChanged﻿

isChanged(fieldName)

Checks whether the value of a field is changed in the current transaction.


| --- | --- | --- |
| fieldName | string | The name of the field to check. |

**Return Value**

| --- | --- |
| boolean | If the value of the field is changed in the current transaction, returns `true`. |

### oldValue﻿

oldValue(fieldName)

Returns the previous value of a single-value field before an update was applied. If the field is not changed in the transaction, returns null.


| --- | --- | --- |
| fieldName | string | The name of the field. |

**Return Value**

| --- | --- |
| Object | If the field is changed in the current transaction, the previous value of the field. Otherwise, null. |

### required﻿

required(fieldName, message)

Asserts that a value is set for a field. If a value for the required field is not set, the specified message is displayed in the user interface.


| --- | --- | --- |
| fieldName | string | The name of the field to check. |
| message | string | The message that is displayed to the user that describes the field requirement. |

### was﻿

was(fieldName, expected)

Checks whether a field was equal to an expected value prior to the current transaction.

Available since 2019.2.55603


| --- | --- | --- |
| fieldName | string | The name of the field to check. |
| expected | string | The expected value. |

**Return Value**

| --- | --- |
| boolean | If the field was equal to the expected value, returns `true`. |

- [FieldBasedValuesCondition](/help/youtrack/devportal/v1-FieldBasedValuesCondition.html)
- [Properties](/help/youtrack/devportal/v1-FieldBasedValuesCondition.html#properties)
- [Methods](/help/youtrack/devportal/v1-FieldBasedValuesCondition.html#methods)
- [becomes](/help/youtrack/devportal/v1-FieldBasedValuesCondition.html#becomes)
- [canBeReadBy](/help/youtrack/devportal/v1-FieldBasedValuesCondition.html#canBeReadBy)
- [canBeWrittenBy](/help/youtrack/devportal/v1-FieldBasedValuesCondition.html#canBeWrittenBy)
- [is](/help/youtrack/devportal/v1-FieldBasedValuesCondition.html#is)
- [isChanged](/help/youtrack/devportal/v1-FieldBasedValuesCondition.html#isChanged)
- [oldValue](/help/youtrack/devportal/v1-FieldBasedValuesCondition.html#oldValue)
- [required](/help/youtrack/devportal/v1-FieldBasedValuesCondition.html#required)
- [was](/help/youtrack/devportal/v1-FieldBasedValuesCondition.html#was)

[FieldBasedUserValuesCondition](jetbrains__com__help__youtrack__devportal__v1-fieldbaseduservaluescondition.md)[Fields](jetbrains__com__help__youtrack__devportal__v1-fields.md)

- Privacy & Security
- Terms Of Use
- Trademarks
- Legal

