Open ashrafalzyoud opened 8 months ago
1) CustomValue.where( custom_field_id: 1).last
is perfectly fine.
2) What do you mean with 'last update value'? Custom values don't keep any time stamp just the value.
Table Name value A. 1 B. 2 C. 3 D. 4
The last value 4 If I need last change value
Name value A. 1 B. 6 // change value C. 3 D. 4
How I can know the last change value
You would have to look into journal and _journaldetails tables to find out when was which custom value changed.
These two records correspond with a change of custom value (CF 22) of issue ID 94029.
MariaDB [redmine]> select * from journals order by created_on desc limit 1\G;
id: 231500
journalized_id: 94029
journalized_type: Issue
user_id: 1935
notes:
created_on: 2023-12-01 14:26:54
updated_on: 2023-12-01 14:26:54
updated_by_id: NULL
private_notes: 0
1 row in set (0,001 sec)
ERROR: No query specified
MariaDB [redmine]> select * from journal_details where journal_id = 231500\G
id: 352696
journal_id: 231500
property: cf
prop_key: 22
old_value:
value: Nice to have
hi all thx for very important plugin
how i can get the last value of cfs[1] how i can get the last update value of cfs[1]