Custom JavaScript is able to be used in a high level way within the Subactions of the Workflow
Instructions
- Select Module in the top left banner then select the appropriate module name link.
- Select the appropriate module for which the Subaction JavaScript is needed.
- Select the Workflows tab, followed by the relevant workflow.
- Select the Actions tab, followed by the Action to be customized.
- Select the Subactions tab, on the right side of the assignment expression paste the code below to assign a fields value to the total number of days since submitted.
...
Info |
---|
|
{(function(){var one_day=1000*60*60*24 * 1.0; var date1_ms = new Date('%(submittedOn)%').getTime();var date2_ms = new Date('%(customDateTime1)%').getTime();var diffDays = Math.ceil(date2_ms - date1_ms) / one_day;return diffDays;})()} |
Related articles
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 5 |
---|
spaces | com.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@8fc |
---|
showSpace | false |
---|
sort | modified |
---|
reverse | true |
---|
type | page |
---|
cql | label = "kb-how-to-article" and type = "page" and space = "HD" |
---|
labels | kb-how-to-article |
---|
|
...