Add to Pending when a specific field changes

SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
I'd like to add specific item updates to the pending queue, just wondering if pending support for a module can already do this.

The items are not using the pending functionality, but if the title of the item changes admin needs to approve that change before it takes effect. Changing the title can have its own form i.e. the title field does not appear on the update item form but on a separate "Change Title" form.

The item should remain visible and the owner should still be able to update the item whilst the title change is in the pending queue.

Is there a way of handling this using the core pending support?

Thanks :)


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 02/03/16 07:34:16PM
brian
@brian
10 years ago
10,149 posts
The core Pending support is all automatic based on jrCore_db_create_item and jrCore_db_update_item - as long as you are using jrCore_db_update_item to UPDATE the item (from the Change Title form), then the pending should work. However, it's also going to be triggered if they do a regular "update" to the item (not it's title).

I can't think of any way to work around this other than to NOT use jrCore_db_update_item in your "regular" view - you'd need to directly update the item_key table via an SQL query.

Let me know if that helps.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
Thanks Brian,

I'll have a think what to do about that. I like the simplicity of using jrCore_db_update_item rather than directly updating.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
michael
@michael
10 years ago
7,791 posts
What about just not letting them update the title? Go into the Form Designer for the UPDATE form and change active to NO.

Or set its 'Display Group' to be Master admin and Profile admin only, so that way if they want to change the title they have to ask an administrator to do it.
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
Thanks Michael, that is a possible solution as well.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

Tags