-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Pavel Drobushevich
committed
Jun 1, 2016
1 parent
9e14de8
commit ca7a868
Showing
8 changed files
with
139 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,41 @@ | ||
Custom Field Constraints | ||
====================== | ||
# Custom Field Constraints | ||
|
||
The Custom Field Constraints mashup allows a custom field to be required in either of the following cases: | ||
|
||
1. When an entity is moved to a specific state (Entity State Constraints) | ||
2. When a specific value is selected in another custom field (Custom Field Constraints) | ||
|
||
_Note: Only Text, Drop-Down List and Multiple Selection List types of custom fields are supported in the mashup._ | ||
After the mashup has been installed, it will need to be configured. Click the Custom Field Constraints mashup in the list of mashups and perform the following changes in it’s code: | ||
|
||
After the mashup has been installed, it will need to be configured. Click the Custom Field Constraints mashup in the list of mashups and perform the following changes in it’s code, as it is shown on the picture below: | ||
* Specify a _Process Name_, which the custom field belongs to, as a ```‘process:’``` value (for entities dependent on a process). | ||
* Specify an _Entity Type_, which the custom field was created for, as a ```‘constraints:’``` value. | ||
|
||
 | ||
|
||
1) Specify a _Process ID_, which the custom field belongs to, as a ```‘processId:’``` value. | ||
## To configure Entity State Constraints | ||
|
||
2) Specify an _Entity Type_, which the custom field was created for, as a ```‘constraints:’``` value. | ||
|
||
|
||
__To configure Entity State Constraints__ | ||
|
||
3) Specify an _Entity State_, when moving to this state in the workflow the custom field will be required, as a ```‘name:’``` in an ```‘entityStates:’``` section. | ||
|
||
4) Specify a _Name_ of a Custom Field, which will be required, as a ```‘requiredCustomFields:’``` in an ```‘entityStates:’``` section. | ||
* Specify an _Entity State_, when moving to this state in the workflow the custom field will be required, as a ```‘name:’``` in an ```‘entityStates:’``` section. | ||
* Specify a _Name_ of a Custom Field, which will be required, as a ```‘requiredCustomFields:’``` in an ```‘entityStates:’``` section. | ||
|
||
_Note: In the case where multiple custom fields are required, provide a comma separated list of custom fields._ | ||
|
||
|
||
__To configure Custom Field Constraints__ | ||
## To configure Custom Field Constraints | ||
|
||
5) Specify the _Name_ of a Custom Field, which contains the constrained value, as a ```‘name:’``` in a ```‘customFields:’``` section. | ||
* Specify the _Name_ of a Custom Field, which contains the constrained value, as a ```‘name:’``` in a ```‘customFields:’``` section. | ||
* Specify the _Constrained value_, which makes a dependent Custom Field required, as a ```‘valueIn:’``` in a ```‘customFields:’``` section. | ||
* In case you need to make a custom field required, when any value except the specified one, is provided, use ```‘valueNotIn’``` instead of ```‘valueIn’``` operator. | ||
* Specify a _Name_ of a Custom Field, which should become required, as a ```‘requiredCustomFields:’``` in a ```‘customFields:’``` section. | ||
|
||
|
||
6) Specify the _Constrained value_, which makes a dependent Custom Field required, as a ```‘valueIn:’``` in a ```‘customFields:’``` section. | ||
## To apply the mashup | ||
|
||
_Note: In case you need to make a custom field required, when any value except the specified one, is provided, use ```‘valueNotIn’``` instead of ```‘valueIn’``` operator._ | ||
|
||
7) Specify a _Name_ of a Custom Field, which should become required, as a ```‘requiredCustomFields:’``` in a ```‘customFields:’``` section. | ||
|
||
8) Click ‘Save Mashup’ button. | ||
* Click ‘Save Mashup’ button. | ||
* Refresh your page: | ||
* Windows: ctrl + F5 | ||
* Mac/Apple: Apple + R or command + R | ||
* Linux: F5 | ||
|
||
|
||
After the Custom Field Constraints mashup has been configured and one of actions has been triggered you will see a popup to provide the a value for required custom field: | ||
|
||
|
||
 | ||
 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,50 @@ | ||
tau.mashups.addModule("CustomFieldConstraints/config", [ | ||
{ | ||
"process": "Kanban", | ||
"constraints": { | ||
"userStory": { | ||
"customFields": [ | ||
{ | ||
"name": "Age", | ||
"requiredCustomFields": [ | ||
"Height" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
]); | ||
{ | ||
// fields for Tasks, Bugs, User Stories, Requests, Features, Epics, Projects | ||
|
||
"process": "Kanban", //Process Name the custom field belongs to | ||
"constraints": { | ||
"userstory": { //Entity Type the custom field was created for | ||
"entityStates": [ | ||
{ | ||
"name": "Closed", //when moving to this state in the workflow the custom field will be required | ||
"requiredCustomFields": ["Resolution", "Summary"] //Custom Fields, which will be required | ||
} | ||
], | ||
"customFields": [ | ||
{ | ||
"name": "Resolution", //Custom Field, which contains the constrained value | ||
"valueIn": ["Rejected", "Postponed"], //values, which makes a dependent Custom Field required | ||
"requiredCustomFields": ["Reason"] //Custom Fields, which will be required | ||
}, | ||
{ | ||
"name": "BillingType", //Custom Field, which contains the constrained value | ||
"valueNotIn": ["Internal"], //values, which doesn't make a dependent Custom Field required | ||
"requiredCustomFields": ["Customer"] //Custom Fields, which will be required | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
{ | ||
// fields for Users, Teams and Programs | ||
|
||
"constraints": { | ||
"user": { //Entity Type the custom field was created for | ||
"customFields": [ | ||
{ | ||
"name": "Office", //Custom Field, which contains the constrained value | ||
"valueIn": ["Remote"], //values, which makes a dependent Custom Field required | ||
"requiredCustomFields": ["Location"] //Custom Fields, which will be required | ||
}, | ||
{ | ||
"name": "BillingType", //Custom Field, which contains the constrained value | ||
"valueNotIn": ["Internal"], //values, which doesn't make a dependent Custom Field required | ||
"requiredCustomFields": ["Employer"] //Custom Fields, which will be required | ||
} | ||
] | ||
} | ||
} | ||
} | ||
] | ||
); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "CustomFieldConstraints", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "This mashup allows a custom field to be required when an entity is moved to a specific state or a specific value is selected in another custom field.", | ||
"author": "Aliaksei Shytkin <[email protected]>", | ||
"scripts": { | ||
|