Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,365,471
Community Members
 
Community Events
168
Community Groups

limit working log maximum to Remaining estimated reach to zero

Hi, I want to limit the logging work on issues if the remaining estimated field reached to zero, I mean maximum value that users can log work is equal to remaining estimated that report set,
below is the code I wrote, I create a behavior with below code and mapped it to Timespent field,

@BaseScript FieldBehaviours fieldBehaviours
FormField logtime = getFieldById(getFieldChanged())
def issueManager = ComponentAccessor.getIssueManager()

def mIssue = underlyingIssue as MutableIssue
//def timeSpent = mIssue.getTimeSpent()
def remainingEstimate = mIssue.getEstimate()

def a = remainingEstimate.value
def b1 = logtime.getValue()
Number b=(Number)b1

if(b.compareTo(a)>0)

{ logtime.setHelpText("Due date of Sub-Task can not be after Due date of the Task, Due Date can be maximum") logtime.setFormValue("") }

else

{ logtime.clearHelpText() }

we are using Tempo timesheet for logging work, of course I test it with jira log work too but it does not work

1 answer

Hi Crs co, did you find any path for this? We have similar need and neither Jira or Tempo provide a native solution...

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events