Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom field which will capture Date and Time stamp when given condition satisfies

Rakesh N
June 3, 2021

All,

I need to create one custom field in JIRA which will capture Date and Time when value of other three fields set to '1'.

Details:

So whenever drop down of "Prioritization Business Impact", "Prioritization Severity" and "Prioritization Work Around" set to "1", new field should capture date & time of that moment.

How can I do this?

 

Thank You.

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Putri Nur Dayana Kamarudin
January 12, 2022

Hey Mike, this answer might come a bit late but you can use this example and alter it accordingly :

import com.atlassian.confluence.labels.Label
import com.atlassian.confluence.labels.LabelManager
import com.atlassian.confluence.labels.Namespace
import com.atlassian.sal.api.component.ComponentLocator
import com.atlassian.confluence.pages.PageManager

def pageManager = ComponentLocator.getComponent(PageManager)
def labelManager = ComponentLocator.getComponent(LabelManager)

def labelName = "test"
log.warn(">>> ${labelName}")

def label = labelManager.getLabel(labelName).getId()
labelManager.deleteLabel(label)

  The script above will delete a label by retrieving the label ID. 

I hope this helps!

TAGS
AUG Leaders

Atlassian Community Events