Hello the Drupal World,

I've done pretty decent searching and have come up with at least half a dozen way to accomplish this, and given the fluidity of Drupal, there are probably a dozen more I didn't see. The question is, given the number of ways to do something, which one is the most stable, uses the least modules, and has the best chance of working in say, D8 or D9?

Desire:
A computed Taxonomy field ('rank') that the authoring user does not see and can not modify, but the computed field shows up normally in the “Submitted by” line after the node is saved and updated after the node is updated.

Explanation:
The author would enter data into the visible taxonomy fields 'price' and 'grade' and the hidden taxonomy field 'rank' would be computed and associated with the node.

Price = $1-$NNN
Grade = A+ through F
Rank = {_computeRank}

_computeRank

The grade runs from A+ to F and are converted to Numerical Grade.
A+ = 12
A = 11
A- = 10
B+ = 9
B = 8
B- = 7
C+ = 6
C = 5
C- = 4
D+ = 3
D = 2
D- = 1
F = 0

Calculation: [Numerical Grade] / [Price] * 100

###############################################

So, anyone have an input on what method would be the most appropriate for long term Drupal viability?

And yes, I'm intentionally not offering up the solutions I've found, as I do not want to bias what people feel is the most long term stable method. And, no, I don't need help with the PHP to get the computation done, just which module(s) and methods to use now to not have to re-write / re-engineer the process every Drupal upgrade.(*)

Thanks,
Michael

(*) And not to put too fine a point on it, please do not suggest “a custom module” as that is anything but long term stable.

Comments

intent’s picture

Interested in this as well.