Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement : Update username for Assets Moved with Renovator JCR_LAST_MODIFIED_BY #2438

Closed
3 tasks done
axp235 opened this issue Oct 14, 2020 · 4 comments
Closed
3 tasks done
Milestone

Comments

@axp235
Copy link

axp235 commented Oct 14, 2020

Required Information

  • AEM Version, including Service Packs, Cumulative Fix Packs, etc: AEM 6.5.2
  • ACS AEM Commons Version: 4.8.6
  • Reproducible on Latest? yes

Expected Behavior

Update the JCR_LAST_MODIFIED_BY field of the assets moved by Renovator with username "Renovator".
Having a username updated for assets moved by "Renovator" helps organizations that have custom Asset workflows to exclude the assets moved from standard workflows (Activation Workflow) to control the publish of these moved assets to scene7 etc and also get a report of assets moved.

Actual Behavior

Currently, the JCR_LAST_MODIFIED_BY is untouched.

Steps to Reproduce

Upload a spreadsheet with a list of assets that need to be moved.

Links

@badvision
Copy link
Contributor

It sounds like a compelling feature but we have to be careful not to impose additional metadata rules on the user. For example, jcr last modified attributes are generally updated by the product when you save changes to a node and I'm not 100% sure we can change that to something other than the user name of the current session. On the other hand, if we apply a new property called something slightly different we can store whatever we want and achieve the desired effect. Unfortunately over time having two last modified by fields could get very confusing because we don't know which one is more correct by looking at it.

Instead, we might consider an alternative: An option exposed to the user that, when checked, will record the timestamp in a new property like "renovator_process_time" or something like that. This tells us two useful things: 1) That renovator did something to this content and 2) When it happened. So we could then use a date range to narrow down the time as well, making our query even more useful.

Thoughts?

@badvision
Copy link
Contributor

(it should be an optional feature that the user must opt-in, that much I'm pretty sticky about because some people might not want metadata updates of any kind because they could cause workflow triggers or other undesired side-effects)

@axp235
Copy link
Author

axp235 commented Oct 15, 2020

@badvision
We drew inspiration for using the "LastModifiedBy" field after looking at some code in ACS Commons.

private static final String DEFAULT_LAST_MODIFIED_BY = "Review Task";

We could go the route of adding a new property to have some constant value as we need that to exclude in workflow config. Date ranges may not be a great way to set up exclude for us.

As for having the user opt-in if he wants the field updated, this was one of our initial ideas then we saw the User name being thrown in as constant. Here is our proposal

We add user opt-in for updating the user-field. If they choose it we will update it with a default value "Renovator"

This provides the users not to choose "user-field" updates and if they choose for reasons similar to us they get something constant they could use as a hook for their workflows or processes.

We are open to more ideas. Thank You!

@axp235
Copy link
Author

axp235 commented Oct 20, 2020

@badvision : Waiting for your thoughts on the above so we can determine how we can proceed. Please let me know if you would like more details.

davidjgonzalez pushed a commit that referenced this issue Nov 3, 2020
* Adding last modified user name as Renovator.
@davidjgonzalez davidjgonzalez added this to the 4.9.0 milestone Nov 4, 2020
@kwin kwin closed this as completed Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants