Skip to content

Commit

Permalink
1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Drobushevich committed Jun 1, 2016
1 parent 9e14de8 commit ca7a868
Show file tree
Hide file tree
Showing 8 changed files with 139 additions and 77 deletions.
44 changes: 20 additions & 24 deletions build/library/README.mkd
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.

![Assigned Effort Report](https://github.com/TargetProcess/TP3MashupLibrary/raw/master/Custom%20Field%20Constraints/code.png)

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:


![Assigned Effort Report](https://github.com/TargetProcess/TP3MashupLibrary/raw/master/Custom%20Field%20Constraints/popup.png)
![Custom Field Constraints Popup](https://github.com/TargetProcess/TP3MashupLibrary/raw/master/Custom%20Field%20Constraints/popup.png)
7 changes: 7 additions & 0 deletions build/library/chunks/3.FormContainer.68a094f76bef92b0fcd8.js

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions build/library/chunks/3.FormContainer.d8b564c71a3dd41efb48.js

This file was deleted.

Binary file removed build/library/code.png
Binary file not shown.
8 changes: 4 additions & 4 deletions build/library/index.js

Large diffs are not rendered by default.

65 changes: 49 additions & 16 deletions build/library/mashup.config.js
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
}
]
}
}
}
]
);
83 changes: 58 additions & 25 deletions build/manager/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
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": {
Expand Down

0 comments on commit ca7a868

Please sign in to comment.