Forums

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

Scriptrunner Page Info Modified Users macro not working properly

Yousaf
Contributor
March 28, 2018

Hello together,

 

in Confluence the Modified Users macro has a problem. 

Currently i´m testing a new version of Confluence (6.7.2). Its on stage. So this macro is now Page Info Modified users by scriptrunner Version 4.2.2

 

So there are a few articles from live (5.6.6) that are having a problem with stage. The macro shows the authors John, $fullnames.get( $idx ), Jack...

 

This person does not work in the company anymore. His account was also deleted. So actually his name or this error should not even appear, right? 

The strange thing is that on live his name shows up just normal although his account does not exist anymore.

 

What could be the problem here ? 

2 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
9 votes
Answer accepted
Raphael KLEIN
Contributor
January 4, 2018

Problem solved. 

i used this script : 

import com.atlassian.jira.component.ComponentAccessor
import java.sql.Timestamp

def customFieldManager = ComponentAccessor.getCustomFieldManager()
def dateCf = customFieldManager.getCustomFieldObject("customfield_12345") // Date time fields require a Timestamp
issue.setCustomFieldValue(dateCf, new Timestamp((new Date()).time))

thanks for this document: https://scriptrunner.adaptavist.com/latest/jira/recipes/workflow/postfunctions/set-issue-attributes.html

Rahul Savaikar
Contributor
August 27, 2019

Hello @Raphael Israel KLEIN ,

 

This worked for me - thank you very much.

 

Regards,

Rahul Savaikar

2 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
January 3, 2018

Without knowing what you've tried, it's quite likely someone will give you the code you've already used.

Could you tell us what you've tried?

Raphael KLEIN
Contributor
January 4, 2018

hi, i had some weird behavior (could not create new Timestamp) but seems like today it is working better... not sure what i did wrong. 

Thanks 

uday
Contributor
June 22, 2021

Hi Raphael ,

i am searching for the same but here i need to capture the date while i click on new transition for every transition i need to pick the date. And when i ever i click on new transition i need to capture the date . Please guide me through the steps and hoe to implement this.

for your example and for better understanding: it should be like in the history user changed from this to this on this date like that

please help me to achieve this and come out from this.

 

thanks in advance!

Regards,

uday.

TAGS
AUG Leaders

Atlassian Community Events